"use client"; import { LoaderCircle, Sparkles, X } from "lucide-react"; import type { SourceDraftMode } from "./types"; export function ComposerSourceDraft({ sourceDraftMode, draftTitle, onDraftTitleChange, draftText, onDraftTextChange, onSaveDraftSource, onClose, isSavingDraft, }: { sourceDraftMode: Exclude; draftTitle: string; onDraftTitleChange: (value: string) => void; draftText: string; onDraftTextChange: (value: string) => void; onSaveDraftSource: () => void; onClose: () => void; isSavingDraft: boolean; }) { const label = sourceDraftMode === "link" ? "Paste link source" : sourceDraftMode === "syllabus" ? "Paste syllabus" : "Add text source"; const titlePlaceholder = sourceDraftMode === "link" ? "Source title" : sourceDraftMode === "syllabus" ? "Syllabus title" : "Notes title"; const bodyPlaceholder = sourceDraftMode === "link" ? "Paste a public study link..." : sourceDraftMode === "syllabus" ? "Paste exam syllabus, chapter list, or teacher blueprint..." : "Paste syllabus, chapter notes, or teacher instructions..."; return (

{label}

onDraftTitleChange(event.target.value)} placeholder={titlePlaceholder} className="mb-2 h-10 w-full rounded-xl border border-white/[0.08] bg-white/[0.035] px-3 text-sm text-white outline-none placeholder:text-white/30 focus:border-white/22" />