"use client"; import type { TrackType } from "@/types/timeline"; import { ArrowLeftToLine, ArrowRightToLine, Copy, Pause, Play, Scissors, Snowflake, SplitSquareHorizontal, Trash2, } from "lucide-react"; import { Button } from "../ui/button"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "../ui/select"; import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from "../ui/tooltip"; interface TimelineToolbarProps { isPlaying: boolean; currentTime: number; duration: number; speed: number; tracks: any[]; toggle: () => void; setSpeed: (speed: number) => void; addTrack: (type: TrackType) => string; addClipToTrack: (trackId: string, clip: any) => void; handleSplitSelected: () => void; handleDuplicateSelected: () => void; handleFreezeSelected: () => void; handleDeleteSelected: () => void; } export function TimelineToolbar({ isPlaying, currentTime, duration, speed, tracks, toggle, setSpeed, addTrack, addClipToTrack, handleSplitSelected, handleDuplicateSelected, handleFreezeSelected, handleDeleteSelected, }: TimelineToolbarProps) { return (
{/* Play/Pause Button */} {isPlaying ? "Pause (Space)" : "Play (Space)"}
{/* Time Display */}
{currentTime.toFixed(1)}s / {duration.toFixed(1)}s
{/* Test Clip Button - for debugging */} {tracks.length === 0 && ( <>
Add a test clip to try playback )}
Split clip (S) Split and keep left (A) Split and keep right (D) Separate audio (E) Duplicate clip (Ctrl+D) Freeze frame (F) Delete clip (Delete)
{/* Speed Control */} Playback Speed
); }