import { useAreaAnimationStore, PLAYBACK_SPEEDS } from '../stores/animationStore' export default function TimelineControl() { const isPlaying = useAreaAnimationStore((s) => s.isPlaying) const currentTime = useAreaAnimationStore((s) => s.currentTime) const startTime = useAreaAnimationStore((s) => s.startTime) const endTime = useAreaAnimationStore((s) => s.endTime) const playbackSpeed = useAreaAnimationStore((s) => s.playbackSpeed) const loop = useAreaAnimationStore((s) => s.loop) const play = useAreaAnimationStore((s) => s.play) const pause = useAreaAnimationStore((s) => s.pause) const stop = useAreaAnimationStore((s) => s.stop) const setPlaybackSpeed = useAreaAnimationStore((s) => s.setPlaybackSpeed) const setProgressByRatio = useAreaAnimationStore((s) => s.setProgressByRatio) const toggleLoop = useAreaAnimationStore((s) => s.toggleLoop) const duration = endTime - startTime const progress = duration > 0 ? (currentTime - startTime) / duration : 0 const formatTime = (ms: number) => { const d = new Date(ms) return d.toLocaleString('ko-KR', { month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit', second: '2-digit', }) } if (startTime === 0 && endTime === 0) return null return (