import { SelectionBox } from "../selection-box"; import { TimelinePlayhead } from "./timeline-playhead"; import { SnapIndicator } from "../snap-indicator"; import { TimelineRuler } from "./timeline-ruler"; import { TimelineTracksArea } from "./timeline-tracks-area"; import type { TimelineTrack } from "@/types/timeline"; import type { SnapPoint } from "@/hooks/use-timeline-snapping"; export interface TimelineContentProps { dynamicTimelineWidth: number; tracks: TimelineTrack[]; duration: number; zoomLevel: number; currentTime: number; seek: (time: number) => void; rulerRef: React.RefObject; rulerScrollRef: React.RefObject; tracksScrollRef: React.RefObject; playheadRef: React.RefObject; trackLabelsRef: React.RefObject; timelineRef: React.RefObject; handleSelectionMouseDown: (e: React.MouseEvent) => void; handleTimelineContentClick: (e: React.MouseEvent) => void; handleSnapPointChange: (snapPoint: SnapPoint | null) => void; clearSelectedElements: () => void; selectionBox: { startPos: { x: number; y: number } | null; currentPos: { x: number; y: number } | null; isActive: boolean; } | null; tracksContainerRef: React.RefObject; currentSnapPoint: SnapPoint | null; showSnapIndicator: boolean; } export function TimelineContent({ dynamicTimelineWidth, tracks, duration, zoomLevel, currentTime, seek, rulerRef, rulerScrollRef, tracksScrollRef, playheadRef, trackLabelsRef, timelineRef, handleSelectionMouseDown, handleTimelineContentClick, handleSnapPointChange, clearSelectedElements, selectionBox, tracksContainerRef, currentSnapPoint, showSnapIndicator, }: TimelineContentProps) { return (
0 ? `grid-rows-[20px_repeat(${tracks.length},minmax(0,max-content))]` : 'grid-rows-[20px_1fr]'}`}> {/* Top-Left Corner (Empty space above track labels) */}
{/* Top Row (Sticky Ruler Header) */} {/* Track Rows */}
{/* Overlay Components */}
); }