"use client"; import { useState, useEffect } from 'react'; import { motion, AnimatePresence } from 'framer-motion'; import { ArrowLeft } from 'lucide-react'; import { useRouter } from 'next/navigation'; import { FilmstripStepper } from '@/components/filmstrip-stepper'; import { AISuggestionBar } from '@/components/ai-suggestion-bar'; import ScriptOverview from '@/components/pages/script-overview'; import StoryboardView from '@/components/pages/storyboard-view'; // 定义工作流程阶段 const WORKFLOW_STAGES = [ { id: 'overview', title: 'Script Overview', subtitle: 'Script Overview', description: 'Extract script structure and key elements' }, { id: 'storyboard', title: 'Storyboard', subtitle: 'Storyboard', description: 'Visualize scene design and transitions' }, { id: 'character', title: 'Character Design', subtitle: 'Character Design', description: 'Customize character appearance and personality' }, { id: 'post', title: 'Post Production', subtitle: 'Post Production', description: 'Sound effects, music and special effects' }, { id: 'output', title: 'Final Output', subtitle: 'Final Output', description: 'Preview and export works' } ]; export default function ScriptWorkFlow() { const router = useRouter(); const [currentStep, setCurrentStep] = useState('overview'); const [loading, setLoading] = useState(true); // 根据当前步骤获取智能预设词条 const getSmartSuggestions = (stepId: string): string[] => { const suggestions = { overview: [ "Analyze core themes and emotions", "Extract character relationship map", "Generate scene and plot outline", "Identify key turning points", "Optimize story structure and pacing" ], storyboard: [ "Design opening shot sequence", "Plan transitions and visual effects", "Generate key scene storyboards", "Optimize shot language and rhythm", "Add camera movement notes" ], character: [ "Design protagonist appearance", "Generate supporting character references", "Create character relationship map", "Add costume and prop designs", "Optimize character actions" ], post: [ "Plan sound and music style", "Design visual effects solution", "Add subtitles and graphics", "Optimize color and lighting", "Plan post-production workflow" ], output: [ "Generate preview version", "Optimize output parameters", "Add opening and ending design", "Export different formats", "Create release plan" ] }; return suggestions[stepId as keyof typeof suggestions] || []; }; useEffect(() => { // 模拟加载效果 const timer = setTimeout(() => { setLoading(false); }, 1500); return () => clearTimeout(timer); }, []); // 处理步骤切换 const handleStepChange = async (stepId: string) => { setLoading(true); setCurrentStep(stepId); // 模拟加载效果 await new Promise(resolve => setTimeout(resolve, 800)); setLoading(false); }; // 处理 AI 建议点击 const handleSuggestionClick = (suggestion: string) => { console.log('选择了建议:', suggestion); // TODO: 处理建议点击逻辑 }; // 处理输入提交 const handleSubmit = (text: string) => { console.log('提交了文本:', text); // TODO: 处理文本提交逻辑 }; return (