(() => {
/* global React, Icons, Avatar */

/* =========================================================
   MOCK DATA — realistic dental program data
   ========================================================= */

window.MOCK = {
  org: {
    name: "Greenwood Public School",
    id: "ORG-48217",
    location: "Pune, MH",
    enrolled: 1284,
    cycle: "Spring Cycle '26",
  },

  stats: {
    totalStudents: 1284,
    screenedThisWeek: 312,
    pendingReports: 47,
    flaggedCases: 18,
  },

  teams: [
    { id: 1, dept: "Grade 1",  unit: "A-101", count: 32, captured: 32, color: "mint" },
    { id: 2, dept: "Grade 1",  unit: "A-102", count: 30, captured: 28, color: "mint" },
    { id: 3, dept: "Grade 2",  unit: "B-201", count: 34, captured: 19, color: "coral" },
    { id: 4, dept: "Grade 2",  unit: "B-202", count: 33, captured: 0,  color: "coral" },
    { id: 5, dept: "Grade 3",  unit: "C-301", count: 31, captured: 31, color: "gold" },
    { id: 6, dept: "Grade 3",  unit: "C-302", count: 29, captured: 26, color: "gold" },
    { id: 7, dept: "Grade 4",  unit: "D-401", count: 35, captured: 12, color: "lilac" },
    { id: 8, dept: "Grade 5",  unit: "E-501", count: 28, captured: 0,  color: "rose" },
  ],

  patients: [
    { id: "STU-10248", name: "Aarav Mehta",    dept: "Grade 3", unit: "C-301", age: 8,  gender: "M", status: "complete",  flagged: false, captures: 5, pdf: true,  date: "May 14" },
    { id: "STU-10249", name: "Priya Iyer",     dept: "Grade 3", unit: "C-301", age: 9,  gender: "F", status: "complete",  flagged: true,  captures: 5, pdf: true,  date: "May 14" },
    { id: "STU-10250", name: "Rohan Kapoor",   dept: "Grade 3", unit: "C-301", age: 8,  gender: "M", status: "complete",  flagged: false, captures: 5, pdf: false, date: "May 14" },
    { id: "STU-10251", name: "Saanvi Reddy",   dept: "Grade 2", unit: "B-201", age: 7,  gender: "F", status: "partial",   flagged: false, captures: 3, pdf: false, date: "May 15" },
    { id: "STU-10252", name: "Vihaan Joshi",   dept: "Grade 2", unit: "B-201", age: 7,  gender: "M", status: "partial",   flagged: false, captures: 2, pdf: false, date: "May 15" },
    { id: "STU-10253", name: "Ananya Patel",   dept: "Grade 1", unit: "A-101", age: 6,  gender: "F", status: "complete",  flagged: false, captures: 5, pdf: true,  date: "May 13" },
    { id: "STU-10254", name: "Kabir Singh",    dept: "Grade 4", unit: "D-401", age: 10, gender: "M", status: "pending",   flagged: false, captures: 0, pdf: false, date: "May 16" },
    { id: "STU-10255", name: "Diya Sharma",    dept: "Grade 1", unit: "A-101", age: 6,  gender: "F", status: "complete",  flagged: true,  captures: 5, pdf: true,  date: "May 13" },
    { id: "STU-10256", name: "Aryan Nair",     dept: "Grade 4", unit: "D-401", age: 10, gender: "M", status: "pending",   flagged: false, captures: 0, pdf: false, date: "May 16" },
    { id: "STU-10257", name: "Ishita Verma",   dept: "Grade 2", unit: "B-202", age: 7,  gender: "F", status: "pending",   flagged: false, captures: 0, pdf: false, date: "May 16" },
    { id: "STU-10258", name: "Arjun Bhat",     dept: "Grade 5", unit: "E-501", age: 11, gender: "M", status: "pending",   flagged: false, captures: 0, pdf: false, date: "May 16" },
    { id: "STU-10259", name: "Meera Krishnan", dept: "Grade 3", unit: "C-302", age: 8,  gender: "F", status: "complete",  flagged: false, captures: 5, pdf: true,  date: "May 14" },
  ],

  activity: [
    { who: "Dr. Priya N.", action: "uploaded 12 dental scans for", target: "Grade 3 · C-301", time: "12m ago", icon: "Capture", tone: "mint" },
    { who: "System",        action: "flagged caries risk in",        target: "Priya Iyer (STU-10249)", time: "32m ago", icon: "Sparkle", tone: "coral" },
    { who: "Nurse Kavya",   action: "registered 28 students in",     target: "Grade 1 · A-102", time: "1h ago",  icon: "Patient", tone: "mint" },
    { who: "Dr. Suresh K.", action: "delivered report PDF to",       target: "Aarav Mehta (STU-10248)", time: "2h ago",  icon: "File",    tone: "gold" },
    { who: "You",           action: "exported records for",          target: "Spring Cycle '26", time: "3h ago",  time2: "—", icon: "Download", tone: "lilac" },
    { who: "Dr. Priya N.",  action: "scheduled screening for",       target: "Grade 5 · E-501", time: "Yesterday", icon: "Calendar", tone: "rose" },
  ],

  upcoming: [
    { date: "May 19", weekday: "Mon", title: "Grade 5 · Section A screening",      where: "E-501",  count: 28 },
    { date: "May 20", weekday: "Tue", title: "Grade 5 · Section B screening",      where: "E-502",  count: 26 },
    { date: "May 22", weekday: "Thu", title: "Follow-ups · flagged caries cases",  where: "Clinic", count: 18 },
    { date: "May 25", weekday: "Sun", title: "Reports dispatch · Spring Cycle",    where: "All parents", count: 1284 },
  ],

  weekBars: [42, 58, 71, 65, 88, 102, 96],
  weekLabels: ["M","T","W","T","F","S","S"],

  // 5 dental capture positions per patient
  positions: [
    { id: "front",  label: "Front",       icon: "M50 18c8 0 14 6 14 14v22c0 8-3 22-14 22S36 62 36 54V32c0-8 6-14 14-14z" },
    { id: "upper",  label: "Upper Arch",  icon: "M20 30q30 -16 60 0v8q-30 -8 -60 0z" },
    { id: "lower",  label: "Lower Arch",  icon: "M20 50q30 16 60 0v-8q-30 8 -60 0z" },
    { id: "left",   label: "Left Bite",   icon: "" },
    { id: "right",  label: "Right Bite",  icon: "" },
  ],
};

window.fmtNum = (n) => n.toLocaleString();

})();
