import React from 'react' import { EPILEPSY_WARNING, ROMAN_NUMERALS } from 'app/constants' import { displayThumbnailURL } from 'app/utils/annotation.utils' export const FullscreenCurtain = ({ element, transitionDuration }) => { // console.log(element, isEntering) const { color } = element const style = { backgroundColor: color.backgroundColor, color: color.textColor, transitionDuration, } console.log(element) const curtainBackground = element.mediaItem && { backgroundImage: 'url(' + (displayThumbnailURL(element.mediaItem)) + ')', } let texts = [] // console.log(element) switch (element.settings.curtain_style) { case 'section_heading': texts.push((
{ROMAN_NUMERALS[element.section.index]}{'.'}
)) texts.push((
)) break case 'video_title': texts.push((
)) break default: texts.push((
)) break } if (element.settings.flashing_light_warning) { texts.push((
{EPILEPSY_WARNING}
)) } return (
{element.mediaItem && (
)}
{texts}
) }