"use client"; import { useId } from "react"; import type { LearningPathVariant, LearnAnythingFormData } from "./learnAnythingTypes"; const TUITION_EXAMPLE_CHIPS = [ "Teach me +2 Physics motion in a straight line", "Explain Kerala Plus Two Chemistry electrochemistry", "Teach Boolean logic from zero", "Revise Class 10 Maths quadratic equations", ]; const GENERAL_EXAMPLE_CHIPS = [ "Build a zero to advanced Python curriculum", "Teach me machine learning from scratch", "Create a business basics learning path", "Learn AI agents with projects", ]; const CLASS_OPTIONS = ["Class 8", "Class 9", "Class 10", "Plus One / Grade 11", "Plus Two / Grade 12"]; const SYLLABUS_OPTIONS = ["Kerala HSE", "CBSE", "ICSE", "State Board"]; const SUBJECT_OPTIONS = ["Physics", "Chemistry", "Mathematics", "Biology", "Computer Science", "Social Science"]; const DAILY_TIME_OPTIONS = ["30 minutes", "1 hour", "1.5 hours", "2 hours", "Exam-eve emergency mode"]; const TUITION_GOAL_OPTIONS = [ { value: "full-marks", label: "Full marks" }, { value: "a-plus", label: "A+" }, { value: "strong-basics", label: "Strong basics" }, { value: "pass", label: "Pass" }, { value: "revision", label: "Revision" }, { value: "exam-rescue", label: "Exam rescue" }, ]; const GENERAL_GOAL_OPTIONS = [ { value: "zero-to-advanced", label: "Zero to advanced" }, { value: "job-skill", label: "Practical job skill" }, { value: "project-based", label: "Project-based learning" }, { value: "exam-or-interview", label: "Exam or interview prep" }, { value: "quick-foundation", label: "Quick foundation" }, ]; const LEVEL_OPTIONS = [ { value: "beginner", label: "Beginner" }, { value: "basic", label: "Basic" }, { value: "average", label: "Average" }, { value: "intermediate", label: "Intermediate" }, { value: "advanced", label: "Advanced" }, ]; interface LearnAnythingQueryBoxProps { formData: LearnAnythingFormData; onChange: (data: LearnAnythingFormData) => void; variant?: LearningPathVariant; } export function LearnAnythingQueryBox({ formData, onChange, variant = "general" }: LearnAnythingQueryBoxProps) { const id = useId(); const isTuition = variant === "tuition"; const examples = isTuition ? TUITION_EXAMPLE_CHIPS : GENERAL_EXAMPLE_CHIPS; const goalOptions = isTuition ? TUITION_GOAL_OPTIONS : GENERAL_GOAL_OPTIONS; const updateField = (field: keyof LearnAnythingFormData, value: string) => { onChange({ ...formData, [field]: value }); }; return (