// Mock data for TomLee Music School prototype.
// Lightweight in-memory store. No instrument logos drawn — placeholder squares.

const TL_TODAY = new Date('2026-04-28T09:00:00');

const TL_TEACHERS = [
  {
    id: 't1',
    name: 'Ms. Chen Wai-Lam',
    nameZh: '陳慧琳老師',
    initials: 'CW',
    instruments: ['Piano', 'Music Theory', 'Aural Training'],
    instrumentsZh: ['鋼琴', '樂理', '視唱練耳'],
    email: 'wlchen@tomleemusic.com',
    branch: 'Tsim Sha Tsui',
    branchZh: '尖沙咀分行',
    studio: 'Studio 4',
    studioZh: '4 號琴室',
  },
];

// Teacher login mock — match anything that looks like a TL email.
const TL_LOGIN = {
  hint: 'Use any tomleemusic.com email and any password',
  hintZh: '請輸入任何通利音樂的電郵地址與密碼',
};

// Quick tags teachers can apply to a lesson
const TL_LESSON_TAGS = [
  { id: 'focused',   en: 'Focused',         zh: '專注' },
  { id: 'breakthru', en: 'Breakthrough',    zh: '突破' },
  { id: 'tired',     en: 'Tired today',     zh: '今日疲倦' },
  { id: 'recital',   en: 'Recital prep',    zh: '備考演奏' },
  { id: 'exam',      en: 'Exam prep',       zh: '備試 ABRSM' },
  { id: 'theory',    en: 'Theory work',     zh: '樂理' },
  { id: 'sightread', en: 'Sight-reading',   zh: '視奏' },
  { id: 'aural',     en: 'Aural training',  zh: '聽辨訓練' },
];

// Practice tempo / progress markers
const TL_PROGRESS_MARKERS = [
  { id: 'new',       en: 'New piece',     zh: '新曲目' },
  { id: 'reading',   en: 'Reading',       zh: '識譜中' },
  { id: 'learning',  en: 'Learning',      zh: '學習中' },
  { id: 'memo',      en: 'Memorising',    zh: '背譜中' },
  { id: 'polish',    en: 'Polishing',     zh: '打磨中' },
  { id: 'performed', en: 'Performance',   zh: '演奏級' },
  { id: 'fluent',    en: 'Fluent',        zh: '流暢' },
  { id: 'done',      en: 'Completed',     zh: '完成' },
];

const TL_STUDENTS = [
  { id: 's1', name: 'Sophie Lam',     age: 9,  instrument: 'Piano',     level: 'Grade 3', parent: 'Mrs. Lam',     parentPhone: '+852 9123 4567', avatar: '#E8DCC8' },
  { id: 's2', name: 'Marcus Wong',    age: 12, instrument: 'Violin',    level: 'Grade 5', parent: 'Mr. Wong',     parentPhone: '+852 9234 5678', avatar: '#D4C4B0' },
  { id: 's3', name: 'Emily Cheung',   age: 7,  instrument: 'Piano',     level: 'Grade 1', parent: 'Mrs. Cheung',  parentPhone: '+852 9345 6789', avatar: '#E0D5C0' },
  { id: 's4', name: 'Daniel Ip',      age: 14, instrument: 'Guitar',    level: 'Grade 6', parent: 'Mrs. Ip',      parentPhone: '+852 9456 7890', avatar: '#CBBFA6' },
  { id: 's5', name: 'Chloe Tang',     age: 10, instrument: 'Cello',     level: 'Grade 4', parent: 'Mr. Tang',     parentPhone: '+852 9567 8901', avatar: '#DDD0BB' },
  { id: 's6', name: 'Aiden Ho',       age: 11, instrument: 'Saxophone', level: 'Grade 3', parent: 'Mrs. Ho',      parentPhone: '+852 9678 9012', avatar: '#D8CDB8' },
  { id: 's7', name: 'Isabella Mak',   age: 8,  instrument: 'Flute',     level: 'Grade 2', parent: 'Mr. Mak',      parentPhone: '+852 9789 0123', avatar: '#E5D9C3' },
];

// Today's timeslots — Tuesday April 28, 2026.
// Each lesson carries its own subject because Ms. Chen teaches Piano + Theory + Aural.
const TL_SCHEDULE_TODAY = [
  { id: 'l1', time: '14:00', duration: 30, studentId: 's3', subject: 'Piano',         subjectZh: '鋼琴',     status: 'completed' },
  { id: 'l2', time: '15:00', duration: 45, studentId: 's1', subject: 'Piano',         subjectZh: '鋼琴',     status: 'completed' },
  { id: 'l3', time: '16:00', duration: 45, studentId: 's7', subject: 'Music Theory',  subjectZh: '樂理',     status: 'pending'   },
  { id: 'l4', time: '17:00', duration: 60, studentId: 's2', subject: 'Aural Training',subjectZh: '視唱練耳', status: 'pending'   },
  { id: 'l5', time: '18:00', duration: 45, studentId: 's4', subject: 'Piano',         subjectZh: '鋼琴',     status: 'pending'   },
  { id: 'l6', time: '19:00', duration: 45, studentId: 's5', subject: 'Piano',         subjectZh: '鋼琴',     status: 'upcoming'  },
];

// Handbook history for Sophie Lam (s1) — 5 lessons back
const TL_HANDBOOK_S1 = [
  {
    id: 'h1', date: '2026-04-21', dateLabel: 'Tue, Apr 21',
    attended: true,
    pieces: [
      { name: 'Burgmüller — Arabesque, Op.100 No.2', progress: 'Polishing' },
      { name: 'Bach — Minuet in G major (Anh. 114)',  progress: 'Memorising' },
    ],
    technique: 'Hanon No.3 at ♩=88. Wrist staying relaxed on descending runs — good improvement.',
    homework: 'Hanon No.3 at ♩=96 by next lesson. Memorise bars 1–16 of the Bach.',
    remark: "Sophie's tone in the Arabesque is really starting to sing. Tackle the LH staccato in bars 9–12 slowly with a metronome.",
  },
  {
    id: 'h2', date: '2026-04-14', dateLabel: 'Tue, Apr 14',
    attended: true,
    pieces: [
      { name: 'Burgmüller — Arabesque, Op.100 No.2', progress: 'Working on dynamics' },
      { name: 'C major scale, 2 octaves',            progress: 'Fluent' },
    ],
    technique: 'Scale work — even tone, slight rush at the top. Hanon No.3 introduced.',
    homework: 'Hanon No.3 hands separately at ♩=80. Arabesque bars 1–24 hands together.',
    remark: 'Lovely focus today. We talked about how dynamics tell the story of the piece.',
  },
  {
    id: 'h3', date: '2026-04-07', dateLabel: 'Tue, Apr 7',
    attended: false,
    pieces: [],
    technique: '',
    homework: '',
    remark: 'Absent — sick leave (notified by parent).',
  },
  {
    id: 'h4', date: '2026-03-31', dateLabel: 'Tue, Mar 31',
    attended: true,
    pieces: [
      { name: 'Burgmüller — Arabesque, Op.100 No.2', progress: 'New piece' },
    ],
    technique: 'Sight-reading: 4-bar exercises in C and G. Confident on C, hesitant on G.',
    homework: 'Sight-read 1 short piece in G major every day. Arabesque RH bars 1–16.',
    remark: 'Started a new piece! Sophie was very excited about the Arabesque title.',
  },
  {
    id: 'h5', date: '2026-03-24', dateLabel: 'Tue, Mar 24',
    attended: true,
    pieces: [
      { name: 'Czerny — Op.599 No.18', progress: 'Completed' },
    ],
    technique: 'Finished Czerny No.18 — clean run-through at performance tempo.',
    homework: 'Choose a new piece for next week (showed 3 options).',
    remark: "Wonderful work finishing the Czerny — Sophie should be proud. Gave her three pieces to choose from for next.",
  },
];

// Skill ratings over time for the chart (Sophie)
const TL_SKILLS_S1 = [
  { date: 'Jan',  technique: 2.6, musicality: 2.8, sight: 2.4, theory: 3.0 },
  { date: 'Feb',  technique: 2.9, musicality: 3.0, sight: 2.6, theory: 3.1 },
  { date: 'Mar',  technique: 3.2, musicality: 3.4, sight: 2.8, theory: 3.3 },
  { date: 'Apr',  technique: 3.6, musicality: 3.8, sight: 3.0, theory: 3.5 },
];

// Repertoire learned
const TL_REPERTOIRE_S1 = [
  { piece: 'Bach — Minuet in G (Anh. 114)',         status: 'In progress', started: 'Apr 2026' },
  { piece: 'Burgmüller — Arabesque, Op.100 No.2',   status: 'In progress', started: 'Mar 2026' },
  { piece: 'Czerny — Op.599 No.18',                 status: 'Completed',   started: 'Feb 2026' },
  { piece: 'Anna Magdalena — Musette in D',         status: 'Completed',   started: 'Jan 2026' },
  { piece: 'Clementi — Sonatina Op.36 No.1, mvt I', status: 'Completed',   started: 'Nov 2025' },
  { piece: 'Schumann — Melody, Op.68 No.1',         status: 'Completed',   started: 'Oct 2025' },
];

// Practice streak (last 14 days) — minutes
const TL_PRACTICE_S1 = [
  20, 25, 0, 30, 30, 45, 40,
  30, 0, 35, 40, 50, 30, 25,
];

// Upcoming lessons
const TL_UPCOMING_S1 = [
  { date: 'Tue · Apr 28', time: '15:00', teacher: 'Ms. Chen', room: 'Studio 4', status: 'today' },
  { date: 'Tue · May 5',  time: '15:00', teacher: 'Ms. Chen', room: 'Studio 4', status: 'scheduled' },
  { date: 'Tue · May 12', time: '15:00', teacher: 'Ms. Chen', room: 'Studio 4', status: 'scheduled' },
];

Object.assign(window, {
  TL_TODAY, TL_TEACHERS, TL_STUDENTS, TL_SCHEDULE_TODAY,
  TL_HANDBOOK_S1, TL_SKILLS_S1, TL_REPERTOIRE_S1,
  TL_PRACTICE_S1, TL_UPCOMING_S1,
  TL_LOGIN, TL_LESSON_TAGS, TL_PROGRESS_MARKERS,
});
