"use client"; import type { ComponentProps } from "react"; import NextLink from "next/link"; import { ArrowRight, BookOpen, CheckCircle2, FileQuestion, FileText, GraduationCap, Layers3, Moon, Network, Sparkles, Target, Upload, Video, } from "lucide-react"; import type { ApiDocument } from "@/lib/api/types"; import type { StudyIntent } from "@/lib/study-intents"; import { QuickActions } from "./QuickActions"; import { SelectedSourcesStrip } from "./SourceControls"; import { StudyComposer } from "./StudyComposer"; import type { StudyActionHandler } from "./types"; import { greetingForNow } from "./utils"; type EmptyStudyWorkspaceProps = { activeIntent: StudyIntent; composerProps: ComponentProps; documents: ApiDocument[]; heroSubtitle: string; heroTitle: string; isLoading: boolean; onAction: StudyActionHandler; onClearSources: () => void; onToggleSource: (sourceId: string) => void; onUpload?: () => void; selectedDocuments: ApiDocument[]; studentName: string; }; export function EmptyStudyWorkspace({ activeIntent, composerProps, documents, heroSubtitle, heroTitle, isLoading, onAction, onClearSources, onToggleSource, onUpload, selectedDocuments, studentName, }: EmptyStudyWorkspaceProps) { const readySourceCount = documents.filter((document) => document.status === "ready").length; const selectedSourceLabel = selectedDocuments.length > 0 ? `${selectedDocuments.length} active source${selectedDocuments.length === 1 ? "" : "s"}` : documents.length > 0 ? `${readySourceCount} ready source${readySourceCount === 1 ? "" : "s"}` : "No source selected"; const starterPrompts: Array<{ label: string; detail: string; intent: StudyIntent; prompt: string; icon: typeof BookOpen; }> = [ { label: "Explain a concept", detail: "Definition, keywords, mark-wise structure", intent: "teach_topic", prompt: "Explain photosynthesis with exam keywords and a 4-mark answer frame", icon: BookOpen, }, { label: "Scoring notes", detail: "Definitions, traps, revision checklist", intent: "generate_notes", prompt: "Generate exam-ready notes on chemical bonding with common mistakes", icon: FileText, }, { label: "Practice quiz", detail: "MCQs with explanations and traps", intent: "generate_quiz", prompt: "Create a 5-question quiz on trigonometry with answer explanations", icon: FileQuestion, }, { label: "Flashcards", detail: "Active recall with memory hooks", intent: "generate_flashcards", prompt: "Build flashcards for organic chemistry reactions and named examples", icon: Layers3, }, { label: "Video plan", detail: "Scene script with exam focus", intent: "create_video_plan", prompt: "Create a 10-minute exam-focused study video plan for electromagnetic induction", icon: Video, }, { label: "Revision plan", detail: "Time-blocked cram schedule", intent: "create_revision_plan", prompt: "I have one night before my physics exam. Build a focused revision plan", icon: Moon, }, ]; const groundingHint = selectedDocuments.length ? `Grounding in ${selectedDocuments[0].title}` : documents.length ? "Select a source for textbook-matched retrieval, or ask any topic." : "Upload material for source-grounded answers, or ask a topic directly."; const workspaceSignals = [ { label: selectedSourceLabel, icon: CheckCircle2 }, { label: "Textbook-aware answers", icon: Network }, { label: "Exam answer practice", icon: Target }, ]; return (
{greetingForNow()}, {studentName}

{heroTitle}

{heroSubtitle}

{workspaceSignals.map((signal) => { const Icon = signal.icon; return ( {signal.label} ); })}

Study tools ready

{groundingHint}

{onUpload ? ( ) : null}
Continue Today's Tuition Study Chat is for doubts. Your official class stays in Tuition.
{workspaceSignals.map((signal) => { const Icon = signal.icon; return ( {signal.label} ); })}
{onUpload ? (
) : null}

Start here

or type your own question above

    {starterPrompts.map((item, index) => (
  1. ))}
); }