import { useState } from 'react'; import { motion } from 'framer-motion'; const CAPTION_STYLES = [ { id: 'heatwave', name: 'HeatWave', emoji: 'ðĨ', desc: 'Yellow + red active, bold energy', colors: ['#FFFF00', '#FF0000'] }, { id: 'neonpop', name: 'NeonPop', emoji: 'ð', desc: 'Cyan glow on dark, bouncy', colors: ['#00FFFF', '#FF00FF'] }, { id: 'cinematic', name: 'Cinematic', emoji: 'ðŽ', desc: 'White elegance, fade-in', colors: ['#FFFFFF', '#FFD700'] }, { id: 'hiphop', name: 'HipHop', emoji: 'ðĪ', desc: 'Impact font, slam effect', colors: ['#FFFFFF', '#FF4444'] }, { id: 'minimal', name: 'Minimal', emoji: 'âĻ', desc: 'Clean white, pure opacity', colors: ['#FFFFFF', '#CCCCCC'] }, ]; const VOICE_PRESETS = [ { id: 'energetic_male', name: 'Energetic Male', emoji: 'ð' }, { id: 'clear_female', name: 'Clear Female', emoji: 'ðïļ' }, { id: 'deep_narrator', name: 'Deep Narrator', emoji: 'ð§' }, { id: 'young_excited', name: 'Young & Excited', emoji: 'âĄ' }, { id: 'calm_storyteller', name: 'Calm Storyteller', emoji: 'ð' }, ]; const MUSIC_GENRES = [ { id: 'energetic_electronic', name: 'Energetic Electronic', emoji: 'ðĩ' }, { id: 'lofi_hiphop', name: 'Lo-fi Hip Hop', emoji: 'ðķ' }, { id: 'dramatic_orchestral', name: 'Dramatic Orchestral', emoji: 'ðŧ' }, { id: 'comedic_quirky', name: 'Comedic Quirky', emoji: 'ðĪŠ' }, { id: 'suspenseful', name: 'Suspenseful', emoji: 'ðą' }, ]; const COLOR_GRADES = [ { id: 'teal_orange', name: 'Teal & Orange', color: 'from-teal-500 to-orange-500' }, { id: 'high_contrast_bw', name: 'High Contrast B&W', color: 'from-gray-900 to-white' }, { id: 'warm_golden', name: 'Warm Golden', color: 'from-yellow-500 to-orange-600' }, { id: 'cold_blue', name: 'Cold Blue', color: 'from-blue-700 to-cyan-400' }, { id: 'vivid_oversaturated', name: 'Vivid', color: 'from-pink-500 to-violet-600' }, ]; export default function ClipCustomizer({ candidates, configs, onDone }) { const [clipConfigs, setClipConfigs] = useState(configs); const [activeClip, setActiveClip] = useState(0); const updateConfig = (index, field, value) => { const updated = [...clipConfigs]; updated[index] = { ...updated[index], [field]: value }; setClipConfigs(updated); }; const formatTime = (seconds) => { const m = Math.floor(seconds / 60); const s = Math.floor(seconds % 60); return `${m}:${s.toString().padStart(2, '0')}`; }; const activeCandidate = candidates[activeClip]; const activeConfig = clipConfigs[activeClip]; if (!activeCandidate || !activeConfig) return null; return (
Style each clip with unique captions, voice, music, and color grading
{/* Clip Tabs */}{activeCandidate.duration.toFixed(1)}s
{activeCandidate.transcript.slice(0, 300)}...