/* ============================================================
   CURIO — Mock data
   ============================================================ */

const CATEGORIES = [
  { id: 'tech',     name: 'Technology',     grad: 'linear-gradient(135deg,#5B54E6,#8B7BF5)', tint:'#EEEDFD', ink:'#2A2480' },
  { id: 'business', name: 'Business',       grad: 'linear-gradient(135deg,#0E7C5A,#3FBF8F)', tint:'#DEF3EA', ink:'#0e6b47' },
  { id: 'design',   name: 'Design',         grad: 'linear-gradient(135deg,#E0457B,#F58BB0)', tint:'#FBE2E8', ink:'#9c1f3c' },
  { id: 'marketing',name: 'Marketing',      grad: 'linear-gradient(135deg,#E9920E,#F5BE5A)', tint:'#FBEFD7', ink:'#8a560a' },
  { id: 'data',     name: 'Data & AI',      grad: 'linear-gradient(135deg,#2E84E6,#6FB2F5)', tint:'#DDEBFB', ink:'#15487f' },
  { id: 'wellness', name: 'Health',         grad: 'linear-gradient(135deg,#C7438C,#7E5BE6)', tint:'#F3E4F2', ink:'#6b2a6b' },
  { id: 'finance',  name: 'Finance',        grad: 'linear-gradient(135deg,#3A8270,#7BB59E)', tint:'#E2EFEB', ink:'#22564a' },
  { id: 'creative', name: 'Creative',       grad: 'linear-gradient(135deg,#7A5BE6,#B79BF5)', tint:'#EBE5FB', ink:'#3f2a80' },
];
const catOf = (id) => CATEGORIES.find(c => c.id === id) || CATEGORIES[0];

const LEVELS = ['Beginner', 'Intermediate', 'Advanced'];

// Helper to build a module
const mod = (title, lessons) => ({ title, lessons });
const L = (title, type, dur) => ({ title, type, dur });

const COURSES = [
  {
    id: 'c1', title: 'Prompt Engineering for Real Work',
    subtitle: 'Design reliable prompts and AI workflows that ship.',
    cat: 'data', level: 'Intermediate', rating: 4.9, learners: 12840, hours: 4.5,
    author: { name: 'Generated for you', kind: 'ai' }, lessonsN: 28, quizzes: 6, featured: true,
    tags: ['AI', 'Productivity', 'Workflows'],
    modules: [
      mod('Foundations of Prompting', [ L('How language models actually read prompts','lesson','7m'), L('The anatomy of a great prompt','lesson','9m'), L('Roles, context, and constraints','lesson','8m'), L('Checkpoint quiz','quiz','5m') ]),
      mod('Patterns That Scale', [ L('Few-shot vs zero-shot','lesson','10m'), L('Chain-of-thought, responsibly','lesson','11m'), L('Structured output & JSON mode','lesson','9m') ]),
      mod('Building Reliable Workflows', [ L('Prompt chaining basics','lesson','12m'), L('Evaluations & guardrails','lesson','10m'), L('Module project: a research assistant','project','25m') ]),
      mod('Shipping & Iteration', [ L('Versioning prompts','lesson','7m'), L('Measuring quality','lesson','8m'), L('Final assessment','quiz','10m') ]),
    ],
  },
  {
    id: 'c2', title: 'The Founder’s Guide to Pricing',
    subtitle: 'Find, test, and defend the price your product deserves.',
    cat: 'business', level: 'Intermediate', rating: 4.8, learners: 8210, hours: 3.2,
    author: { name: 'Generated for you', kind: 'ai' }, lessonsN: 22, quizzes: 5,
    tags: ['SaaS', 'Strategy', 'Revenue'],
    modules: [
      mod('Pricing Mindset', [ L('Value, not cost','lesson','8m'), L('Willingness to pay','lesson','9m') ]),
      mod('Models & Tiers', [ L('Per-seat, usage, hybrid','lesson','11m'), L('Designing tiers that convert','lesson','10m'), L('Quiz: choose a model','quiz','5m') ]),
      mod('Testing Price', [ L('Van Westendorp surveys','lesson','9m'), L('Running price experiments','lesson','12m') ]),
    ],
  },
  {
    id: 'c3', title: 'Color Theory for Product Designers',
    subtitle: 'Build palettes that feel intentional, not accidental.',
    cat: 'design', level: 'Beginner', rating: 4.9, learners: 15630, hours: 2.8,
    author: { name: 'Generated for you', kind: 'ai' }, lessonsN: 18, quizzes: 4,
    tags: ['UI', 'Color', 'Systems'],
    modules: [
      mod('Seeing Color', [ L('Hue, saturation, lightness','lesson','7m'), L('Perceptual color & OKLCH','lesson','9m') ]),
      mod('Building Palettes', [ L('From one color to a system','lesson','11m'), L('Accessible contrast','lesson','8m'), L('Quiz','quiz','4m') ]),
    ],
  },
  {
    id: 'c4', title: 'Modern Python, From Scratch',
    subtitle: 'Write clean, idiomatic Python and actually understand it.',
    cat: 'tech', level: 'Beginner', rating: 4.7, learners: 24100, hours: 6.1,
    author: { name: 'Generated for you', kind: 'ai' }, lessonsN: 34, quizzes: 8,
    tags: ['Python', 'Programming'],
    modules: [
      mod('Getting Started', [ L('Your first program','lesson','6m'), L('Variables & types','lesson','8m'), L('Quiz','quiz','5m') ]),
      mod('Control Flow', [ L('If, for, while','lesson','10m'), L('Functions','lesson','11m') ]),
    ],
  },
  {
    id: 'c5', title: 'Content That Converts',
    subtitle: 'A practical system for marketing writing that sells.',
    cat: 'marketing', level: 'Intermediate', rating: 4.6, learners: 6740, hours: 3.5,
    author: { name: 'Generated for you', kind: 'ai' }, lessonsN: 20, quizzes: 5,
    tags: ['Copywriting', 'Growth'],
    modules: [ mod('Foundations', [ L('Who you’re writing for','lesson','8m'), L('Hooks & headlines','lesson','9m') ]) ],
  },
  {
    id: 'c6', title: 'Personal Finance, Demystified',
    subtitle: 'Budgeting, investing, and the math nobody taught you.',
    cat: 'finance', level: 'Beginner', rating: 4.9, learners: 31200, hours: 4.0,
    author: { name: 'Generated for you', kind: 'ai' }, lessonsN: 26, quizzes: 6,
    tags: ['Investing', 'Budgeting'],
    modules: [ mod('Money Basics', [ L('Cashflow & budgeting','lesson','9m'), L('Emergency funds','lesson','7m') ]) ],
  },
  {
    id: 'c7', title: 'Intro to Data Storytelling',
    subtitle: 'Turn raw numbers into decisions people remember.',
    cat: 'data', level: 'Beginner', rating: 4.8, learners: 9430, hours: 3.1,
    author: { name: 'Generated for you', kind: 'ai' }, lessonsN: 19, quizzes: 4,
    tags: ['Analytics', 'Charts'],
    modules: [ mod('The Story in Data', [ L('Charts that don’t lie','lesson','8m') ]) ],
  },
  {
    id: 'c8', title: 'Mindful Productivity',
    subtitle: 'Get more done without burning out.',
    cat: 'wellness', level: 'Beginner', rating: 4.7, learners: 18900, hours: 2.4,
    author: { name: 'Generated for you', kind: 'ai' }, lessonsN: 16, quizzes: 3,
    tags: ['Focus', 'Habits'],
    modules: [ mod('Attention', [ L('The myth of multitasking','lesson','7m') ]) ],
  },
  {
    id: 'c9', title: 'Brand Identity Essentials',
    subtitle: 'Craft a brand that’s recognizable in a glance.',
    cat: 'creative', level: 'Intermediate', rating: 4.8, learners: 7120, hours: 3.6,
    author: { name: 'Generated for you', kind: 'ai' }, lessonsN: 21, quizzes: 5,
    tags: ['Branding', 'Logo'],
    modules: [ mod('Brand Foundations', [ L('Positioning','lesson','9m') ]) ],
  },
];

// In-progress for "Continue learning"
const CONTINUING = [
  { id: 'c1', progress: 64, last: 'Chain-of-thought, responsibly' },
  { id: 'c4', progress: 28, last: 'Functions' },
  { id: 'c6', progress: 91, last: 'Emergency funds' },
];

const FEATURES = [
  { icon: 'Layers', title: 'AI curriculum design', body: 'Describe a topic and audience. Coursedy scaffolds a complete structure — modules, lessons, learning objectives, and quizzes — in one shot.' },
  { icon: 'File', title: 'Full lesson content', body: 'Every lesson is written end-to-end and stored as markdown, tuned to the tone and difficulty you choose. No blank-page anxiety.' },
  { icon: 'Edit', title: 'WYSIWYG lesson editor', body: 'Rich text editing with headings, lists, tables, code blocks, and images. Toggle to markdown source whenever you want it.' },
  { icon: 'Help', title: 'Auto-generated quizzes', body: 'Four multiple-choice questions per module with answer explanations. Regenerate or add individual questions with a click.' },
  { icon: 'Spark', title: 'Agentic AI chat', body: 'Ask Coursedy to add a chapter, regenerate a module, improve a lesson, or insert a quiz question — and it actually executes the edit.' },
  { icon: 'Mic', title: 'Instructor slide notes', body: 'Three to five talking points per lesson so you can present without scripting from scratch.' },
  { icon: 'Layers', title: 'Drag-drop outline', body: 'Reorder modules and lessons by drag handle or kebab menu. Add, rename, delete inline — every change auto-saves.' },
  { icon: 'Eye', title: 'Paginated preview', body: 'Read-only learner view with sidebar nav, progress bar, and interactive quiz reveal. See exactly what your learners will see.' },
  { icon: 'Download', title: 'Eight export formats', body: 'DOCX, PDF, HTML, Markdown, ePub, JSON, Udemy Quiz CSV, and SCORM 1.2 — ready for any LMS or course platform.' },
];

const STEPS = [
  { n: '01', title: 'Describe your course', body: 'Tell Coursedy the topic, who it’s for, and the depth you want. The more specific, the sharper the result.' },
  { n: '02', title: 'AI builds it live', body: 'Modules, full lessons, quizzes, and slide notes — structured and ready to review, in under two minutes.' },
  { n: '03', title: 'Refine & export', body: 'Edit inline or chat with Coursedy to reshape sections, then export as DOCX, PDF, SCORM, ePub, and more.' },
];

const TESTIMONIALS = [
  { quote: 'I used to spend two weeks mapping a new course. With Coursedy I had a full 8-module curriculum drafted in under an hour. It changed how I build products.', name: 'Sarah Okafor', role: 'Business Coach · Growth Spark Co.', cat:'business' },
  { quote: 'The quiz generation alone saves me hours per course. The questions are genuinely good — not obvious, not repetitive. My students actually engage with them.', name: 'Marcus Tan', role: 'Educator · The Learning Arc', cat:'tech' },
  { quote: 'We build compliance training for corporate clients. Coursedy turns a brief into a full course draft before the client finishes their first coffee.', name: 'Priya Nair', role: 'L&D Lead · Axiom People', cat:'design' },
];

const FAQS = [
  { q: 'How does Coursedy generate a full course?', a: 'You describe the topic, audience, depth, and tone. Coursedy drafts a complete structure, writes every lesson body in markdown, generates four multiple-choice quiz questions per module, and adds 3–5 slide-note talking points per lesson — typically in under two minutes.' },
  { q: 'Can I edit what the AI produces?', a: 'Yes. Module titles, lesson titles, and the lesson body open inline for editing — saves on blur. The dedicated lesson editor has a Toast UI WYSIWYG editor with markdown toggle, plus an Improve action and an Add image search.' },
  { q: 'Can the AI also revise existing content?', a: 'Yes. The course-level chat can add a chapter, regenerate a module, improve a lesson with tone/reading-level controls, or insert a quiz question — these actions execute and persist automatically. The lesson chat applies edits to the body of the lesson you’re viewing.' },
  { q: 'What can I export?', a: 'Eight formats: DOCX, PDF, HTML, Markdown, ePub, JSON, Udemy-style Quiz CSV, and SCORM 1.2 (LMS-ready ZIP). All exports include the full module and lesson content; SCORM packages include per-lesson HTML and an imsmanifest.xml.' },
  { q: 'Can I preview the learner experience?', a: 'Yes. The Preview button opens a paginated read-only view with sidebar navigation, a progress bar, prev/next pagination, and interactive quiz reveal — exactly what your end users will see.' },
  { q: 'Who is Coursedy for?', a: 'Creators selling courses, companies running internal training, and educators building curriculum — anyone who needs great course content fast and full control to refine it.' },
  { q: 'Is there a free plan?', a: 'Yes — the Free tier covers 1 course, 1 module per course, and 3 lessons per module so you can fully try the workflow with no credit card. Pro unlocks unlimited courses, modules, and lessons.' },
];

const PRICING = [
  { name: 'Free', price: 0, period: '', tagline: 'For trying things out', cta: 'Start free', highlight: false,
    feats: ['1 course', '1 module per course', '3 lessons per module', 'DOCX / PDF / JSON exports', 'AI chat & inline editing'] },
  { name: 'Pro', price: 24, period: '/mo', tagline: 'For creators & coaches', cta: 'Start free trial', highlight: true,
    feats: ['Unlimited courses, modules, lessons', 'All 8 export formats (SCORM, ePub…)', 'Stock photo search', 'Edit history & WYSIWYG editor', 'Priority generation speed'] },
  { name: 'Teams', price: 79, period: '/mo', tagline: 'For orgs & schools', cta: 'Talk to sales', highlight: false,
    feats: ['Everything in Pro', 'Shared workspace & roles', 'Brand kit & templates', 'Analytics & SSO', 'Onboarding manager'] },
];

const SAMPLE_TOPICS = [
  'Intro to Watercolor Painting',
  'Negotiation for Engineers',
  'Cybersecurity for Small Business',
  'The Science of Sleep',
  'Public Speaking Without Fear',
  'Sustainable Home Gardening',
];

/* ---------- Admin data ---------- */
const ADMIN_STATS = [
  { label: 'Total users', value: '48,210', delta: '+12.4%', up: true, icon: 'Users' },
  { label: 'Courses generated', value: '186,402', delta: '+8.1%', up: true, icon: 'Book' },
  { label: 'MRR', value: '$214,800', delta: '+5.6%', up: true, icon: 'Dollar' },
  { label: 'Avg. gen time', value: '94s', delta: '−11s', up: true, icon: 'Zap' },
];

const ADMIN_GEN_BARS = [42, 55, 48, 67, 72, 61, 80, 76, 90, 84, 97, 110];
const ADMIN_GEN_LABELS = ['Jun','Jul','Aug','Sep','Oct','Nov','Dec','Jan','Feb','Mar','Apr','May'];

const ADMIN_USERS = [
  { name: 'Sarah Okafor', email: 'sarah@growthspark.co', plan: 'Pro', courses: 24, status: 'active', joined: 'Apr 2', cat:'business' },
  { name: 'Marcus Tan', email: 'marcus@learningarc.io', plan: 'Teams', courses: 61, status: 'active', joined: 'Mar 18', cat:'tech' },
  { name: 'Priya Nair', email: 'priya@axiompeople.com', plan: 'Teams', courses: 88, status: 'active', joined: 'Feb 9', cat:'design' },
  { name: 'Diego Alvarez', email: 'diego@indie.dev', plan: 'Free', courses: 2, status: 'trial', joined: 'May 28', cat:'data' },
  { name: 'Mei Lin', email: 'mei.lin@kaizen.jp', plan: 'Pro', courses: 17, status: 'active', joined: 'May 11', cat:'wellness' },
  { name: 'Tom Becker', email: 'tom@beckerstudio.de', plan: 'Free', courses: 1, status: 'flagged', joined: 'May 30', cat:'creative' },
];

const ADMIN_QUEUE = [
  { title: 'Advanced Tax Strategies 2026', cat: 'finance', author: 'Diego Alvarez', flag: 'Needs review', time: '4m ago' },
  { title: 'Ethical Hacking Fundamentals', cat: 'tech', author: 'Tom Becker', flag: 'Sensitive topic', time: '22m ago' },
  { title: 'Clinical Nutrition Basics', cat: 'wellness', author: 'Mei Lin', flag: 'Medical claims', time: '1h ago' },
];

Object.assign(window, {
  CATEGORIES, catOf, LEVELS, COURSES, CONTINUING, FEATURES, STEPS, TESTIMONIALS, FAQS,
  PRICING, SAMPLE_TOPICS, ADMIN_STATS, ADMIN_GEN_BARS, ADMIN_GEN_LABELS, ADMIN_USERS, ADMIN_QUEUE,
});
