import { isOntimeEvent, MaybeString, OntimeEvent, OntimeRundown } from 'ontime-types'; import { formatTime } from '../../../common/utils/time'; import SuperscriptTime from '../common/superscript-time/SuperscriptTime'; import { trimRundown } from './studioClock.utils'; import './StudioClock.scss'; interface StudioClockScheduleProps { rundown: OntimeRundown; selectedId: MaybeString; nextId: MaybeString; onAir: boolean; } // TODO: fit titles on screen const MAX_TITLES = 11; export default function StudioClockSchedule(props: StudioClockScheduleProps) { const { rundown, selectedId, nextId, onAir } = props; const delayed = rundown.filter((event) => isOntimeEvent(event)) as OntimeEvent[]; const trimmedRundown = trimRundown(delayed, selectedId, MAX_TITLES); return (