"use client"; import React from 'react'; import { X, Film, Loader2, Sparkles } from 'lucide-react'; import { cn } from '@/lib/utils'; interface VideoPromptModalProps { isOpen: boolean; onClose: () => void; image: { data: string; prompt: string } | null; onGenerate: (prompt: string) => Promise; } export function VideoPromptModal({ isOpen, onClose, image, onGenerate }: VideoPromptModalProps) { const [prompt, setPrompt] = React.useState(''); const [loading, setLoading] = React.useState(false); React.useEffect(() => { if (isOpen && image) { setPrompt(image.prompt); } }, [isOpen, image]); if (!isOpen) return null; const handleSubmit = async (e: React.FormEvent) => { e.preventDefault(); setLoading(true); try { await onGenerate(prompt); onClose(); } catch (err) { console.error(err); } finally { setLoading(false); } }; return (
{/* Modal Container - Whisk Style Dark Card */}
{/* Close Button */} {/* Header with Gradient */}

Animate Image

Transform your image into an 8-second video

{/* Content */}
{/* Image Preview & Input Row */}
{/* Image Preview */}
{image && ( <> Source
Source Image
)}
{/* Prompt Input */}