import dynamic from "next/dynamic"; import { ArrowUp, Box, Lightbulb, Loader2, Plus, Sparkles, X } from "lucide-react"; import type { ChangeEvent } from "react"; import { Button } from "@/components/ui/button"; import { Select, SelectContent, SelectItem, SelectTrigger, } from "@/components/ui/select"; import { Textarea } from "@/components/ui/textarea"; import { cn } from "@/lib/utils"; import type { ModelOption, UploadFileItem } from "./types"; const HomeAnimationEmbed = dynamic( () => import("@/components/home/home-animation-embed").then( (module) => module.HomeAnimationEmbed ), { loading: () => (
), ssr: false, } ); type LovartHeroComposerProps = { composerPlaceholder: string; displayLogo: string; files: UploadFileItem[]; handleAddFiles: (files: FileList | null) => void; heroPromoActionText?: string | null; heroPromoText?: string | null; heroSubtitleText?: string | null; heroTitleText?: string | null; homeAnimationData?: { enabled?: boolean; htmlContent?: string; fileName?: string; }; isAgentModeActive: boolean; isMembershipEnabled: boolean; isSubmitting: boolean; onSubmit: () => void; openUpgradeDialog: () => void; prompt: string; removeFile: (id: string) => void; setPrompt: (value: string) => void; siteName: string; modelOptions: ModelOption[]; onModelChange: (modelId: string) => void; onStartAgentMode: () => void; selectedModelId: string; }; export function LovartHeroComposer({ composerPlaceholder, displayLogo, files, handleAddFiles, heroPromoActionText, heroPromoText, heroSubtitleText, heroTitleText, homeAnimationData, isAgentModeActive, isMembershipEnabled, isSubmitting, onSubmit, openUpgradeDialog, prompt, removeFile, setPrompt, siteName, modelOptions, onModelChange, onStartAgentMode, selectedModelId, }: LovartHeroComposerProps) { return ({heroSubtitleText || "懂你的设计代理,帮你搞定一切"}