import type { Theme } from "../../hooks/use-theme"; import { cn } from "../../lib/utils"; import { Tool, ToolHeader, ToolContent } from "../ai-elements/tool"; import { Loader2 } from "lucide-react"; export interface BookFormArgs { title?: string; genre?: string; platform?: string; targetChapters?: number; chapterWordCount?: number; language?: string; brief?: string; } export interface BookFormCardProps { readonly args: BookFormArgs; readonly onArgsChange: (args: BookFormArgs) => void; readonly onConfirm: () => void; readonly confirming: boolean; readonly theme: Theme; } const PLATFORM_OPTIONS = [ { label: "番茄小说", value: "tomato" }, { label: "起点中文网", value: "qidian" }, { label: "飞卢", value: "feilu" }, { label: "其他", value: "other" }, ] as const; const LANGUAGE_OPTIONS = [ { label: "中文", value: "zh" }, { label: "English", value: "en" }, ] as const; const labelClass = "text-[10px] uppercase tracking-[0.18em] text-muted-foreground font-semibold"; const inputClass = cn( "w-full rounded-lg border border-border/60 bg-background/80 px-3 py-1.5 text-sm", "outline-none focus:border-primary/50 focus:ring-2 focus:ring-primary/10 transition-all", "placeholder:text-muted-foreground/40", ); function RadioGroup({ options, value, onChange, disabled, }: { readonly options: ReadonlyArray<{ readonly label: string; readonly value: string }>; readonly value: string | undefined; readonly onChange: (v: string) => void; readonly disabled?: boolean; }) { return (
确认后将由 Architect 生成完整 foundation