import React from 'react' import { ClipTag } from '../components' import { ContentProps } from '../../../types' import { ContentLayout } from '../../../ContentLayout' import type * as ComponentWorkarounds from '../../Workarounds' type Preset = 'full-player' | 'thumbnail' export interface ClipProps extends ContentProps { preload?: string preset?: Preset maxClipWidth?: number } const ClipComponent: React.FC = ({ content, preset = 'full-player', preload = 'auto', maxClipWidth = 0, }) => { const clip = content?.clips?.length ? content?.clips[0] : null if (!clip) { return null } const id: string = 'id' in content ? content.id : '' const poster: string = content.autoplay ? '' : clip.poster || '' const noAudio = content.noAudio ?? false const accessibility = content.accessibility ?? {} const systemTitle = content.systemTitle ?? '' // TODO CI-3354: dataLayout is deprecated, this property will be layoutWidth when we no longer use bodyXML const layout = content.layoutWidth ?? content.dataLayout ?? 'in-line' if (preset === 'thumbnail') { return ( ) } return ( ) } export default ClipComponent