"use client"; import { useState } from 'react'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import { Button } from '@/components/ui/button'; import { Badge } from '@/components/ui/badge'; import { Progress } from '@/components/ui/progress'; import { Separator } from '@/components/ui/separator'; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select'; import { ArrowLeft, Play, Download, Share2, Settings, Clock, FileVideo, Sparkles, CheckCircle, } from 'lucide-react'; interface FinalCompositionStepProps { onPrevious: () => void; } const exportFormats = [ { value: 'mp4-1080p', label: 'MP4 - 1080p (Recommended)', size: '~150MB' }, { value: 'mp4-720p', label: 'MP4 - 720p', size: '~80MB' }, { value: 'mp4-4k', label: 'MP4 - 4K', size: '~400MB' }, { value: 'webm-1080p', label: 'WebM - 1080p', size: '~120MB' }, ]; const projectSummary = { title: 'AI Technology Guide', totalDuration: '4:50', chapters: 4, totalShots: 8, actors: 3, musicTracks: 4, }; export function FinalCompositionStep({ onPrevious }: FinalCompositionStepProps) { const [exportFormat, setExportFormat] = useState('mp4-1080p'); const [isGenerating, setIsGenerating] = useState(false); const [generationProgress, setGenerationProgress] = useState(0); const [isComplete, setIsComplete] = useState(false); const handleGenerate = () => { setIsGenerating(true); setGenerationProgress(0); // Simulate video generation progress const interval = setInterval(() => { setGenerationProgress((prev) => { if (prev >= 100) { clearInterval(interval); setIsGenerating(false); setIsComplete(true); return 100; } return prev + Math.random() * 10; }); }, 500); }; const handleDownload = () => { // Simulate download const link = document.createElement('a'); link.href = '#'; link.download = `${projectSummary.title.replace(/\s+/g, '_')}.mp4`; link.click(); }; return (
{/* Project Summary */} Project Summary
{projectSummary.totalDuration}
Total Duration
{projectSummary.chapters}
Chapters
{projectSummary.totalShots}
Total Shots
{projectSummary.actors}
AI Actors
{/* Video Preview */} Video Preview
Video preview
{projectSummary.title} {projectSummary.totalDuration}
{/* Export Settings */} Export Settings
{exportFormats.find(f => f.value === exportFormat)?.size}
Based on {projectSummary.totalDuration} duration
{/* Generation Status */} {isComplete ? ( ) : ( )} {isComplete ? 'Video Ready!' : isGenerating ? 'Generating Video...' : 'Ready to Generate'} {isGenerating && (
Processing... {Math.round(generationProgress)}%

This may take a few minutes. You can close this tab and return later.

)} {isComplete && (
Your video is ready for download!
)} {!isGenerating && !isComplete && (

All steps completed! Your video is ready to be generated with the selected settings.

)}
{/* Chapter Breakdown */} Chapter Breakdown
{[ { name: 'Introduction', duration: '0:45', shots: 2 }, { name: 'Core Concepts', duration: '1:20', shots: 2 }, { name: 'Practical Applications', duration: '1:15', shots: 2 }, { name: 'Future Outlook', duration: '0:50', shots: 2 }, ].map((chapter, index) => (
Chapter {index + 1} {chapter.name}
{chapter.duration}
{chapter.shots} shots
))}
{/* Action Buttons */}
{isComplete && ( )}
); }