// Real content — 5 channels, 5 flagship courses with full lesson lists.
// Content is in English (default audience is SEA).

const CHANNELS = [
  {
    id: 'classics',
    slug: 'classics',
    name: 'Chinese Classics',
    nameI18n: {
      en: 'Classics', zh: '国学经典', 'zh-TW': '國學經典',
      ja: '古典', ko: '고전',
      id: 'Klasik', th: 'คลาสสิก', vi: 'Kinh điển',
      ms: 'Klasik', tl: 'Klasiko',
    },
    tag: 'Timeless wisdom, read slow',
    tagline: 'Read the Analects, Dao De Jing, and Zhuangzi in plain English — one chapter a day.',
    theme: 'zen',
    icon: 'yin',
    courseCount: 38,
    color: '#8a1919',
  },
  {
    id: 'emotions',
    slug: 'emotions',
    name: 'Relationships & Emotions',
    nameI18n: {
      en: 'Emotions', zh: '关系情感', 'zh-TW': '關係情感',
      ja: '感情', ko: '감정',
      id: 'Emosi', th: 'อารมณ์', vi: 'Cảm xúc',
      ms: 'Emosi', tl: 'Damdamin',
    },
    tag: 'Love, trust, and the inner life',
    tagline: 'Field-tested frameworks for healthy attachment, honest conversation, and inner peace.',
    theme: 'rose',
    icon: 'heart',
    courseCount: 24,
    color: '#b54868',
  },
  {
    id: 'ai',
    slug: 'ai',
    name: 'Applied AI',
    nameI18n: {
      en: 'AI', zh: '应用 AI', 'zh-TW': '應用 AI',
      ja: 'AI', ko: 'AI',
      id: 'AI', th: 'AI', vi: 'AI',
      ms: 'AI', tl: 'AI',
    },
    tag: 'Build, ship, repeat',
    tagline: 'From prompt engineering to production agents — taught by practitioners, not professors.',
    theme: 'cyber',
    icon: 'brain',
    courseCount: 52,
    color: '#4fd4c4',
  },
  {
    id: 'business',
    slug: 'business',
    name: 'Business Mindset',
    nameI18n: {
      en: 'Business', zh: '商业思维', 'zh-TW': '商業思維',
      ja: 'ビジネス', ko: '비즈니스',
      id: 'Bisnis', th: 'ธุรกิจ', vi: 'Kinh doanh',
      ms: 'Bisnes', tl: 'Negosyo',
    },
    tag: 'Think sharper, decide better',
    tagline: 'Mental models, negotiation craft, and capital sense from operators across ASEAN.',
    theme: 'admiral',
    icon: 'briefcase',
    courseCount: 41,
    color: '#1a3a6b',
  },
  {
    id: 'wellness',
    slug: 'wellness',
    name: 'Wellness & Longevity',
    nameI18n: {
      en: 'Wellness', zh: '养生长寿', 'zh-TW': '養生長壽',
      ja: '養生', ko: '웰니스',
      id: 'Kesehatan', th: 'สุขภาพ', vi: 'Sức khỏe',
      ms: 'Kesihatan', tl: 'Kalusugan',
    },
    tag: 'Breathe, move, last',
    tagline: 'Qi-Gong, TCM basics, tropical nutrition, and sleep science — living well in hot climates.',
    theme: 'jade',
    icon: 'leaf',
    courseCount: 29,
    color: '#2f6b4a',
  },
];

// Five flagship courses (one per channel). Each has a full lesson list + pricing.
const COURSES = [
  {
    id: 'c-analects',
    slug: 'analects-for-modern-life',
    channel: 'classics',
    title: 'The Analects for Modern Life',
    subtitle: 'Confucius, chapter by chapter — for builders, parents, and friends in Asia today',
    instructor: { name: 'Dr. Mei-Lin Koh', role: 'Sinologist · NUS', avatar: 'ML' },
    lang: 'en', subtitles: ['en','zh','id','vi','th'],
    rating: 4.9, ratingCount: 2847, students: 18422,
    hours: 9.2, lessons: 24, level: 'All levels',
    price: 49, priceMember: 0,
    seal: '仁',
    cover: 'classics-hero',
    tags: ['Philosophy','Daily practice','Chinese classics'],
    blurb: 'The Analects isn\'t a rulebook — it\'s a record of how one teacher and his students actually figured out how to live. We read it the old way: slowly, out loud, and against our real lives. By the end you\'ll have your own commentary.',
    whatYoullLearn: [
      'Read the 20 books of the Analects in plain English with Chinese alongside',
      'Apply 仁 (ren), 礼 (li), and 恕 (shu) to messy modern situations',
      'Build a personal "junzi checklist" — a weekly reflection you\'ll actually do',
      'Join a weekly 40-minute live circle with Dr. Koh',
    ],
    lessons_full: [
      { id:1, t:'Why read the Analects in 2026?', mins:18, free:true },
      { id:2, t:'Book 1 — On learning that sticks', mins:24 },
      { id:3, t:'仁 (ren): the two-person character', mins:22 },
      { id:4, t:'Book 2 — Governing yourself before anyone else', mins:28 },
      { id:5, t:'礼 (li): ritual as muscle memory', mins:26 },
      { id:6, t:'Filial piety without guilt', mins:30 },
      { id:7, t:'Book 4 — The junzi and the small person', mins:24 },
      { id:8, t:'恕 (shu): the silver rule, not the golden', mins:21 },
      { id:9, t:'Book 7 — On the Master himself', mins:26 },
      { id:10, t:'Learning vs. thinking (2.15)', mins:18 },
      { id:11, t:'Book 9 — The river of time', mins:24 },
      { id:12, t:'What Confucius refused to discuss', mins:22 },
      { id:13, t:'Book 12 — Yan Hui and the one thread', mins:28 },
      { id:14, t:'Naming things rightly (正名)', mins:23 },
      { id:15, t:'Book 13 — On governing', mins:25 },
      { id:16, t:'Friendship: three good, three bad', mins:20 },
      { id:17, t:'Book 15 — Aphorisms for hard days', mins:27 },
      { id:18, t:'On music and the ordered life', mins:22 },
      { id:19, t:'Book 17 — Difficult chapters', mins:26 },
      { id:20, t:'Book 18 — The recluses', mins:24 },
      { id:21, t:'Book 19 — What the students said later', mins:22 },
      { id:22, t:'Book 20 — Three short charges', mins:18 },
      { id:23, t:'Writing your own commentary', mins:32 },
      { id:24, t:'Closing circle · live', mins:48 },
    ],
  },
  {
    id: 'c-attach',
    slug: 'attachment-styles-grown-up',
    channel: 'emotions',
    title: 'Attachment Styles, Grown Up',
    subtitle: 'Secure, anxious, avoidant, disorganized — and how to actually change',
    instructor: { name: 'Hana Ramirez, LCSW', role: 'Couples therapist · Manila', avatar: 'HR' },
    lang: 'en', subtitles: ['en','zh','id','tl','th'],
    rating: 4.8, ratingCount: 4103, students: 27880,
    hours: 6.5, lessons: 18, level: 'Beginner-friendly',
    price: 39, priceMember: 0,
    seal: '情',
    cover: 'emotions-hero',
    tags: ['Psychology','Relationships','Self-work'],
    blurb: 'Most "attachment" content tells you which label you are and stops. This course is the second half of the book — what to actually do on a Tuesday night when your partner goes quiet and your chest tightens.',
    whatYoullLearn: [
      'Name your own pattern without using it as an excuse',
      'De-escalate the four fights every couple has',
      '3 scripts for hard conversations (starting, repairing, leaving)',
      'Build a "secure base" routine that takes 10 minutes a day',
    ],
    lessons_full: [
      { id:1, t:'What attachment is — and isn\'t', mins:16, free:true },
      { id:2, t:'Mapping your own style (with exercise)', mins:24 },
      { id:3, t:'The anxious loop: protest, pursue, collapse', mins:22 },
      { id:4, t:'The avoidant loop: numb, deactivate, miss', mins:22 },
      { id:5, t:'Disorganized: both, at once', mins:24 },
      { id:6, t:'What secure actually looks like on a bad day', mins:20 },
      { id:7, t:'Fight 1 — "You never listen"', mins:26 },
      { id:8, t:'Fight 2 — Money', mins:24 },
      { id:9, t:'Fight 3 — Family-of-origin holidays', mins:22 },
      { id:10, t:'Fight 4 — Sex and wanting', mins:28 },
      { id:11, t:'Repair: the 4-step apology', mins:20 },
      { id:12, t:'When repair won\'t work: honest exit', mins:26 },
      { id:13, t:'Dating again with intent', mins:22 },
      { id:14, t:'Friendship attachment (yes, it\'s a thing)', mins:18 },
      { id:15, t:'Parenting from your actual style', mins:24 },
      { id:16, t:'A 10-minute daily secure-base routine', mins:16 },
      { id:17, t:'When to go to therapy', mins:18 },
      { id:18, t:'Closing: a letter to your younger self', mins:22 },
    ],
  },
  {
    id: 'c-agents',
    slug: 'shipping-ai-agents',
    channel: 'ai',
    title: 'Shipping AI Agents',
    subtitle: 'From prompt to production — the honest version',
    instructor: { name: 'Arjun Patel', role: 'Ex-Stripe, founder · Singapore', avatar: 'AP' },
    lang: 'en', subtitles: ['en','zh','id','vi'],
    rating: 4.9, ratingCount: 1922, students: 9210,
    hours: 11.4, lessons: 28, level: 'Intermediate',
    price: 149, priceMember: 0,
    seal: 'AI',
    cover: 'ai-hero',
    tags: ['Engineering','LLMs','Production'],
    blurb: 'You\'ve built a demo. It works on the happy path. Then customers use it, and everything falls apart. This course is the playbook I wish I had — evals, guardrails, cost control, the graveyard of prompt hacks.',
    whatYoullLearn: [
      'Pick between tools, RAG, fine-tuning, and agents (and when to say no)',
      'Write evals that actually catch regressions',
      'Ship with <200ms p95 for >95% of requests',
      'Handle adversarial inputs without paranoia',
    ],
    lessons_full: [
      { id:1, t:'What an "agent" even is in 2026', mins:22, free:true },
      { id:2, t:'The six shapes of LLM products', mins:24 },
      { id:3, t:'Tool use vs. retrieval vs. fine-tune', mins:28 },
      { id:4, t:'Writing prompts that survive model swaps', mins:30 },
      { id:5, t:'Structured outputs: JSON, tools, grammar', mins:26 },
      { id:6, t:'Your first eval suite', mins:32 },
      { id:7, t:'Regression testing for prompts', mins:24 },
      { id:8, t:'RAG that doesn\'t suck', mins:34 },
      { id:9, t:'Chunking, embeddings, rerankers', mins:28 },
      { id:10, t:'Hybrid search: BM25 + vectors', mins:22 },
      { id:11, t:'Multi-turn state machines', mins:26 },
      { id:12, t:'Tool-calling loops without infinite runs', mins:24 },
      { id:13, t:'Cost: tokens, caching, tiered routing', mins:28 },
      { id:14, t:'Latency: streaming, parallel, speculative', mins:26 },
      { id:15, t:'Guardrails that actually trigger', mins:22 },
      { id:16, t:'Prompt injection: defense in depth', mins:24 },
      { id:17, t:'Fine-tuning: when it\'s worth it', mins:30 },
      { id:18, t:'Evaluation beyond accuracy: harm, cost, UX', mins:26 },
      { id:19, t:'Observability: traces, spans, scoring', mins:22 },
      { id:20, t:'A/B testing with non-deterministic outputs', mins:24 },
      { id:21, t:'On-call for LLM apps', mins:18 },
      { id:22, t:'When to go multi-agent', mins:26 },
      { id:23, t:'Memory architectures that ship', mins:24 },
      { id:24, t:'Voice agents: real constraints', mins:20 },
      { id:25, t:'Pricing an AI product', mins:22 },
      { id:26, t:'Case study: our $3M agent', mins:34 },
      { id:27, t:'Case study: the one we killed', mins:28 },
      { id:28, t:'Your 90-day shipping plan', mins:32 },
    ],
  },
  {
    id: 'c-strat',
    slug: 'strategy-across-asean',
    channel: 'business',
    title: 'Strategy Across ASEAN',
    subtitle: 'Go-to-market in the region you actually live in',
    instructor: { name: 'Phuong Nguyen', role: 'Former MD, regional VC', avatar: 'PN' },
    lang: 'en', subtitles: ['en','zh','id','vi','th','ms','tl'],
    rating: 4.8, ratingCount: 1044, students: 6230,
    hours: 8.7, lessons: 22, level: 'Intermediate',
    price: 129, priceMember: 0,
    seal: '商',
    cover: 'business-hero',
    tags: ['Strategy','GTM','ASEAN'],
    blurb: 'Silicon Valley playbooks don\'t survive contact with Jakarta, Bangkok, or Hanoi. Phuong has led deals in all three. This is how regional operators actually think — about channels, hiring, regulation, and the long game.',
    whatYoullLearn: [
      'Size a market when the data is missing or lying',
      'Pick a first country and stop second-guessing',
      'Build a local team without burning the culture',
      'Spot the three ways regional deals die',
    ],
    lessons_full: [
      { id:1, t:'Why ASEAN isn\'t one market', mins:22, free:true },
      { id:2, t:'The six cities that actually matter', mins:26 },
      { id:3, t:'Market sizing when data is bad', mins:28 },
      { id:4, t:'Indonesia: scale vs. margin', mins:30 },
      { id:5, t:'Vietnam: speed and trust', mins:26 },
      { id:6, t:'Thailand: distribution is king', mins:24 },
      { id:7, t:'Philippines: services and diaspora', mins:22 },
      { id:8, t:'Malaysia & Singapore: HQ games', mins:26 },
      { id:9, t:'Picking your first country', mins:24 },
      { id:10, t:'Channels: online, offline, reseller', mins:22 },
      { id:11, t:'Pricing across 10x GDP spreads', mins:28 },
      { id:12, t:'Local partnerships without losing control', mins:26 },
      { id:13, t:'Hiring a country manager', mins:24 },
      { id:14, t:'Culture across borders', mins:22 },
      { id:15, t:'Regulatory: who to know, who to pay', mins:30 },
      { id:16, t:'Raising from regional VCs', mins:28 },
      { id:17, t:'Exits: trade sale vs. IPO vs. PE', mins:26 },
      { id:18, t:'Case: a unicorn that stayed regional', mins:32 },
      { id:19, t:'Case: a US entrant that failed', mins:28 },
      { id:20, t:'Case: a family business that compounded', mins:30 },
      { id:21, t:'Your 5-year regional plan', mins:26 },
      { id:22, t:'Live Q&A', mins:55 },
    ],
  },
  {
    id: 'c-breath',
    slug: 'breath-sleep-tropics',
    channel: 'wellness',
    title: 'Breath, Sleep, and the Tropics',
    subtitle: 'A 30-day routine for energy in hot, humid cities',
    instructor: { name: 'Siti Amirah', role: 'Qi-Gong teacher · KL', avatar: 'SA' },
    lang: 'en', subtitles: ['en','id','ms','th','vi'],
    rating: 4.9, ratingCount: 3311, students: 21044,
    hours: 5.8, lessons: 30, level: 'All levels',
    price: 29, priceMember: 0,
    seal: '养',
    cover: 'wellness-hero',
    tags: ['Wellness','Qi-Gong','Sleep'],
    blurb: 'Most longevity advice is written for people who live in 20°C, low-humidity places. If you live in Jakarta, Bangkok, or Manila, you need a different protocol. This is 30 short days of breath, light, and movement designed for our climate.',
    whatYoullLearn: [
      'A 4-minute morning breath practice you\'ll actually keep',
      'Sleep cooler without the aircon bill',
      'Tropical-specific nutrition (hydration, electrolytes, seasonal fruit)',
      '3 standing Qi-Gong forms for office bodies',
    ],
    lessons_full: [
      { id:1, t:'Why the tropics need a different playbook', mins:12, free:true },
      { id:2, t:'Day 1 — Morning breath (4 minutes)', mins:10 },
      { id:3, t:'Day 2 — Cold water, hot climate', mins:12 },
      { id:4, t:'Day 3 — Light as medicine', mins:14 },
      { id:5, t:'Day 4 — Standing Qi-Gong: tree', mins:16 },
      { id:6, t:'Day 5 — Electrolytes, honest version', mins:12 },
      { id:7, t:'Day 6 — The 5pm nap question', mins:10 },
      { id:8, t:'Day 7 — Rest day, reflection', mins:8 },
      { id:9, t:'Day 8 — Standing Qi-Gong: cloud hands', mins:18 },
      { id:10, t:'Day 9 — Sleep cool without aircon', mins:14 },
      { id:11, t:'Day 10 — Caffeine: the regional case', mins:12 },
      { id:12, t:'Day 11 — Evening wind-down', mins:14 },
      { id:13, t:'Day 12 — TCM meridians, plain version', mins:16 },
      { id:14, t:'Day 13 — Seasonal fruit as medicine', mins:14 },
      { id:15, t:'Day 14 — Rest day, check in', mins:10 },
      { id:16, t:'Day 15 — Qi-Gong: golden rooster', mins:18 },
      { id:17, t:'Day 16 — Walking as breathwork', mins:12 },
      { id:18, t:'Day 17 — The humidity-sleep link', mins:14 },
      { id:19, t:'Day 18 — Eating less at night', mins:12 },
      { id:20, t:'Day 19 — Heat acclimation', mins:16 },
      { id:21, t:'Day 20 — Rest day, energy audit', mins:8 },
      { id:22, t:'Day 21 — Full morning routine', mins:20 },
      { id:23, t:'Day 22 — Hydration beyond water', mins:14 },
      { id:24, t:'Day 23 — Afternoon slump protocol', mins:12 },
      { id:25, t:'Day 24 — Blue light in tropical cities', mins:14 },
      { id:26, t:'Day 25 — Breath for anxiety spikes', mins:12 },
      { id:27, t:'Day 26 — Family meals, slowed', mins:14 },
      { id:28, t:'Day 27 — Rest day', mins:8 },
      { id:29, t:'Day 28–29 — Integration', mins:22 },
      { id:30, t:'Day 30 — Your ongoing practice', mins:16 },
    ],
  },
];

// Side-list courses for channel pages (metadata only)
const SIDE_COURSES = [
  { id:'s1',  channel:'classics', title:'Dao De Jing in 12 Readings',      hours:4.5,  lessons:12, students:8942,  price:29, seal:'道', instructor:'Dr. Liang' },
  { id:'s2',  channel:'classics', title:'Zhuangzi for the Anxious',        hours:6.2,  lessons:14, students:5322,  price:39, seal:'逍', instructor:'Ven. Jing' },
  { id:'s3',  channel:'classics', title:'The Art of War, Read Slowly',     hours:7.1,  lessons:16, students:12400, price:49, seal:'兵', instructor:'Col. Tan' },
  { id:'s4',  channel:'classics', title:'I Ching for Decision Making',     hours:8.4,  lessons:20, students:3890,  price:59, seal:'易', instructor:'Master Shen' },
  { id:'s5',  channel:'emotions', title:'How to Have Hard Conversations',  hours:4.0,  lessons:10, students:14230, price:29, seal:'言', instructor:'Jia Lin' },
  { id:'s6',  channel:'emotions', title:'Parenting Without Shouting',      hours:5.5,  lessons:14, students:9820,  price:39, seal:'慈', instructor:'Dr. Nur' },
  { id:'s7',  channel:'emotions', title:'Divorce With Grace',              hours:3.8,  lessons:9,  students:2140,  price:39, seal:'别', instructor:'Hana R.' },
  { id:'s8',  channel:'ai',       title:'Prompt Engineering Foundations',  hours:4.2,  lessons:12, students:18430, price:49, seal:'言', instructor:'Arjun P.' },
  { id:'s9',  channel:'ai',       title:'RAG in Production',               hours:6.8,  lessons:16, students:6430,  price:99, seal:'检', instructor:'Jin Park' },
  { id:'s10', channel:'ai',       title:'Evals for LLM Apps',              hours:3.5,  lessons:10, students:4120,  price:79, seal:'评', instructor:'Maya Tan' },
  { id:'s11', channel:'business', title:'Negotiation, the Asian Way',      hours:5.4,  lessons:13, students:7820,  price:59, seal:'和', instructor:'K. Suharto' },
  { id:'s12', channel:'business', title:'First 90 Days as a Manager',      hours:4.8,  lessons:12, students:11200, price:49, seal:'治', instructor:'Dr. Wong' },
  { id:'s13', channel:'wellness', title:'Tea as Practice',                 hours:2.5,  lessons:8,  students:6730,  price:19, seal:'茶', instructor:'Chen Mu' },
  { id:'s14', channel:'wellness', title:'TCM Basics for Busy People',      hours:5.2,  lessons:14, students:4900,  price:39, seal:'医', instructor:'Dr. Huang' },
];

// User profile for the demo
const DEMO_USER = {
  name: 'Priya Sutanto',
  email: 'priya@yylearn.demo',
  avatar: 'PS',
  country: 'ID',
  joined: 'March 2025',
  membership: { tier: 'all-access', renews: '2026-05-18', price: 19 },
  stats: { courses: 7, hours: 42, streak: 14, certs: 3 },
  enrolled: [
    { courseId:'c-analects', progress:42, lastLesson:9, lastSeen:'2 days ago' },
    { courseId:'c-agents',   progress:78, lastLesson:21, lastSeen:'yesterday' },
    { courseId:'c-breath',   progress:100, lastLesson:30, lastSeen:'last week', completed:true },
    { courseId:'c-attach',   progress:12, lastLesson:2, lastSeen:'5 days ago' },
  ],
  orders: [
    { id:'#YY-20418', date:'2026-03-12', item:'All-access · monthly', amount:19, status:'paid' },
    { id:'#YY-20031', date:'2026-02-12', item:'All-access · monthly', amount:19, status:'paid' },
    { id:'#YY-19672', date:'2026-01-08', item:'Shipping AI Agents (single course)', amount:149, status:'paid' },
    { id:'#YY-19104', date:'2025-11-22', item:'Classics channel · monthly', amount:9, status:'refunded' },
  ],
};

// Admin mock stats
const ADMIN_STATS = {
  mrr: 184200, mrrDelta: 12.4,
  students: 42118, studentsDelta: 8.1,
  courses: 184, coursesDelta: 4,
  watchHours: 89420, watchHoursDelta: 18.2,
  weekly: [32,41,38,52,48,61,58,66,72,71,78,84,82,91],
  topCourses: [
    { title:'Shipping AI Agents', students:9210, revenue:98400 },
    { title:'Attachment Styles, Grown Up', students:27880, revenue:62100 },
    { title:'The Analects for Modern Life', students:18422, revenue:54300 },
    { title:'Breath, Sleep, and the Tropics', students:21044, revenue:48800 },
    { title:'Strategy Across ASEAN', students:6230, revenue:44200 },
  ],
  recentOrders: [
    { id:'#YY-20811', user:'Linh N.',    item:'All-access · yearly',   amount:190, country:'VN', at:'2 min ago' },
    { id:'#YY-20810', user:'Rahul S.',   item:'Shipping AI Agents',    amount:149, country:'SG', at:'4 min ago' },
    { id:'#YY-20809', user:'Somchai T.', item:'Classics · monthly',    amount:9,   country:'TH', at:'11 min ago' },
    { id:'#YY-20808', user:'Mei W.',     item:'All-access · monthly',  amount:19,  country:'MY', at:'18 min ago' },
    { id:'#YY-20807', user:'Carlo P.',   item:'Attachment · single',   amount:39,  country:'PH', at:'22 min ago' },
    { id:'#YY-20806', user:'Yuki T.',    item:'All-access · yearly',   amount:190, country:'JP', at:'31 min ago' },
  ],
};

Object.assign(window, { CHANNELS, COURSES, SIDE_COURSES, DEMO_USER, ADMIN_STATS });
