import { useState } from 'react' import { X, Smile } from 'lucide-react' import clsx from 'clsx' /** * Caption style editor modal * Props: { isOpen, onClose, clipId, jobId } */ function CaptionEditor({ isOpen, onClose, clipId, jobId }) { const [style, setStyle] = useState('highlight') const [fontSize, setFontSize] = useState(48) const [textColor, setTextColor] = useState('#FFFFFF') const [highlightColor, setHighlightColor] = useState('#E8A020') const [bgColor, setBgColor] = useState('#000000') const [bgOpacity, setBgOpacity] = useState(0.5) const [position, setPosition] = useState('bottom') const [emoji, setEmoji] = useState(true) const [language, setLanguage] = useState('en') if (!isOpen) return null const styles = [ { id: 'highlight', label: 'Highlight Word', icon: '✨' }, { id: 'box', label: 'Box', icon: '📦' }, { id: 'outline', label: 'Outline', icon: '⭕' }, { id: 'bold', label: 'Bold', icon: '𝗕' }, { id: 'none', label: 'None', icon: '—' }, ] const positions = [ { id: 'top', label: 'Top', pos: 'top-4' }, { id: 'middle', label: 'Middle', pos: 'top-1/2' }, { id: 'bottom', label: 'Bottom', pos: 'bottom-4' }, ] const handleSave = () => { // Mock API call console.log({ style, fontSize, textColor, highlightColor, bgColor, bgOpacity, position, emoji, language, }) onClose() } return ( <> {/* Overlay */}
{/* Modal */}Preview
Sample caption text
{emoji &&✨ 🎬 🔥
}