'use client'; import { Button } from '@/components/ui/button'; import { cn } from '@/lib/utils'; import { useMitt } from '@/plugins/MittContext'; import useMediaStore from '@/stores/MediaStore'; import useVideoEditorStore from '@/stores/VideoEditorStore'; import { Download, Play, RefreshCw, Square, SquarePen } from 'lucide-react'; const EditorControls = ({ className = '', onEditClick = () => {}, isEditActive = false }) => { const { videoIsPlaying } = useVideoEditorStore(); const { init } = useMediaStore(); const emitter = useMitt(); const handlePlay = () => { emitter.emit('video-play'); }; const handleOnEditClick = () => { handleReset(); onEditClick(); }; const handleReset = () => { emitter.emit('video-reset'); }; const handleDownloadButton = () => { handleReset(); emitter.emit('video-open-download-modal'); }; const handleAIButton = () => { handleReset(); emitter.emit('open-ai-editor-sheet'); }; const handleRefresh = () => { handleReset(); init(true); }; const togglePlayPause = () => { if (videoIsPlaying) { handleReset(); } else { handlePlay(); } }; return (