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 (

ðŸŽĻ Customize Your Clips

Style each clip with unique captions, voice, music, and color grading

{/* Clip Tabs */}
{candidates.map((candidate, i) => ( ))}
{/* Left: Clip Info */}

📝 Clip Info

Score: {activeCandidate.virality_score.toFixed(0)}
updateConfig(activeClip, 'title', e.target.value)} placeholder="AI will generate if empty" className="w-full mt-1 bg-dark-900 border border-white/10 rounded-lg px-3 py-2 text-sm focus:outline-none focus:border-primary-500/50" />

{activeCandidate.duration.toFixed(1)}s

{activeCandidate.transcript.slice(0, 300)}...

{/* Middle: Style Options */}

ðŸŽĻ Caption Style

{CAPTION_STYLES.map((style) => ( ))}

🎎 Color Grade

{COLOR_GRADES.map((grade) => (
{/* Right: Audio Options */}

🔊 Voice

{VOICE_PRESETS.map((voice) => ( ))}

ðŸŽĩ Background Music

{MUSIC_GENRES.map((genre) => ( ))}
{/* Toggles */}
{/* Generate Button */}
); }