// landing-data.jsx — mode-split content (personal vs business).
// Exposes globals for sibling babel scripts (no module system).

const HUE = {
  primary: "30 50% 60%",
  violet:  "30 45% 42%",
  cyan:    "30 50% 56%",
  amber:   "60 25% 55%",
  green:   "30 50% 64%",
  rose:    "180 5% 55%",
  teal:    "30 40% 38%",
  indigo:  "30 35% 30%",
  red:     "180 5% 50%",
  orange:  "60 25% 55%",
  blue:    "30 50% 64%",
};

// ─── Built-in / canonical sections — universal, shown in both modes ───────
const BUILTIN = [
  {
    id: "documentation",
    title: "Documentation",
    iconKey: "book",
    hue: HUE.blue,
    desc: "Index (RAG) any data. Plug it into any section as searchable knowledge.",
    bullets: ["Confluence, Drive, uploads, URLs", "Hybrid + graph + rerank", "Cross-section semantic search"],
  },
  {
    id: "ai-hub",
    title: "AI Hub",
    iconKey: "wand",
    hue: HUE.violet,
    desc: "Create any plugin — MCPs, skills, agents. Versioned, permissioned, shareable.",
    bullets: ["MCPs · skills · agents in one place", "Version + permission controls", "Share with friends, teams, customers"],
  },
];

// ─── Marketplace — PERSONAL (B2C) ─────────────────────────────────────────
const MARKET_PERSONAL = [
  {
    id: "finance",
    title: "Personal Finance",
    author: "@penny.w",
    verified: true,
    iconKey: "chart",
    hue: HUE.primary,
    desc: "Categorize transactions, set envelopes, watch the runway. CSV + bank import.",
    stars: 2104, forks: 488, credits: "+701",
    tags: ["Finance"],
  },
  {
    id: "subs",
    title: "Subscriptions Tracker",
    author: "@kira.h",
    verified: true,
    iconKey: "fork",
    hue: HUE.indigo,
    desc: "Recurring spend, free-trial alerts, cancel-by reminders. Imports from Gmail.",
    stars: 1842, forks: 421, credits: "+612",
    tags: ["Finance"],
  },
  {
    id: "habits",
    title: "Daily Habits",
    author: "@miura",
    iconKey: "flame",
    hue: HUE.orange,
    desc: "Track habits, streaks, and weekly review. Connects to your other goals.",
    stars: 962, forks: 244, credits: "+318",
    tags: ["Tracker"],
  },
  {
    id: "jobapps",
    title: "Job Application Tracker",
    author: "@alex.j",
    verified: true,
    iconKey: "fileText",
    hue: HUE.blue,
    desc: "Applications, stages, recruiter contacts. Imports from Gmail, status auto-updates.",
    stars: 1503, forks: 342, credits: "+448",
    tags: ["Career"],
  },
  {
    id: "workout",
    title: "Workout Logger",
    author: "@dora-lift",
    iconKey: "bolt",
    hue: HUE.rose,
    desc: "Sets, reps, PRs. Auto-deload weeks. Charts that don't lie.",
    stars: 873, forks: 219, credits: "+288",
    tags: ["Fitness"],
  },
  {
    id: "recipes",
    title: "Recipe Box",
    author: "@chef.m",
    iconKey: "flask",
    hue: HUE.green,
    desc: "Save recipes from any URL. Weekly meal plan → grocery list.",
    stars: 1124, forks: 287, credits: "+371",
    tags: ["Home"],
  },
  {
    id: "travel",
    title: "Travel Planner",
    author: "@nomad",
    verified: true,
    iconKey: "globe",
    hue: HUE.cyan,
    desc: "Trips, itineraries, packing lists. Email confirmations parsed automatically.",
    stars: 1421, forks: 333, credits: "+412",
    tags: ["Travel"],
  },
  {
    id: "reading",
    title: "Reading Queue",
    author: "@p.lin",
    iconKey: "book",
    hue: HUE.violet,
    desc: "Capture URLs, distill with Claude, export a weekly digest.",
    stars: 612, forks: 142, credits: "+162",
    tags: ["Notes"],
  },
  {
    id: "home",
    title: "Home Inventory",
    author: "@haus",
    iconKey: "cube",
    hue: HUE.teal,
    desc: "Items, locations, warranties. QR labels via webcam. Insurance-ready exports.",
    stars: 487, forks: 124, credits: "+98",
    tags: ["Home"],
  },
  {
    id: "pets",
    title: "Pet Health",
    author: "@dr.bark",
    iconKey: "shield",
    hue: HUE.amber,
    desc: "Vet visits, vaccinations, meds, weight curves. Alerts before annual shots.",
    stars: 758, forks: 187, credits: "+229",
    tags: ["Home"],
  },
  {
    id: "birthdays",
    title: "Birthday & Gift Reminders",
    author: "@auntie",
    iconKey: "gift",
    hue: HUE.rose,
    desc: "People, dates, gift ideas. Pings you 2 weeks before so you actually remember.",
    stars: 542, forks: 121, credits: "+147",
    tags: ["Personal"],
  },
  {
    id: "garden",
    title: "Plant Care",
    author: "@green.thumb",
    iconKey: "flask",
    hue: HUE.green,
    desc: "Watering schedules, repotting reminders, light maps for your apartment.",
    stars: 388, forks: 92, credits: "+78",
    tags: ["Home"],
  },
];

// ─── Marketplace — BUSINESS ───────────────────────────────────────────────
const MARKET_BUSINESS = [
  {
    id: "conference-contacts",
    title: "Conference Contacts",
    author: "@areti-team",
    verified: true,
    iconKey: "users",
    hue: HUE.violet,
    desc: "Scan a QR, capture name + Telegram + LinkedIn + notes. One tap to follow up.",
    stars: 612, forks: 148, credits: "+201",
    tags: ["Sales"],
  },
  {
    id: "crm",
    title: "Sales CRM",
    author: "@nova-go",
    verified: true,
    iconKey: "users",
    hue: HUE.indigo,
    desc: "Pipeline, deals, contacts, activity feed. Webhooks on every stage change.",
    stars: 3204, forks: 712, credits: "+1.1k",
    tags: ["Sales"],
  },
  {
    id: "observability",
    title: "Observability",
    author: "@platform",
    verified: true,
    iconKey: "chart",
    hue: HUE.cyan,
    desc: "Metrics, traces, logs. Slack alerts. PromQL-compatible, OTLP in.",
    stars: 2588, forks: 624, credits: "+892",
    tags: ["DevOps"],
  },
  {
    id: "company",
    title: "Company",
    author: "@areti-team",
    verified: true,
    iconKey: "building",
    hue: HUE.primary,
    desc: "PeopleForce sync, org chart, profiles, time off, reporting lines.",
    stars: 1842, forks: 388, credits: "+512",
    tags: ["People"],
  },
  {
    id: "hr",
    title: "HR",
    author: "@hrops",
    verified: true,
    iconKey: "clipboard",
    hue: HUE.green,
    desc: "Pipeline of candidates, interview kits, offer letters, onboarding playbooks.",
    stars: 1521, forks: 312, credits: "+421",
    tags: ["People"],
  },
  {
    id: "finances",
    title: "Finances",
    author: "@ledger",
    verified: true,
    iconKey: "chart",
    hue: HUE.amber,
    desc: "P&L, cash flow, burn, runway. Bank + Stripe + QuickBooks connectors.",
    stars: 1988, forks: 433, credits: "+672",
    tags: ["Finance"],
  },
  {
    id: "compliance",
    title: "Compliance",
    author: "@trust",
    iconKey: "shieldCheck",
    hue: HUE.rose,
    desc: "SOC2 evidence collection, policy register, vendor reviews, audit trail.",
    stars: 871, forks: 198, credits: "+254",
    tags: ["Risk"],
  },
  {
    id: "incidents",
    title: "Incidents & On-call",
    author: "@oncall",
    iconKey: "bug",
    hue: HUE.red,
    desc: "Pagers, runbooks, post-mortems. Auto-link to Observability traces.",
    stars: 1102, forks: 276, credits: "+318",
    tags: ["DevOps"],
  },
  {
    id: "deals-pipeline",
    title: "Deal Desk",
    author: "@biz-ops",
    iconKey: "fileText",
    hue: HUE.violet,
    desc: "Quote → contract → DocuSign → finance handoff. Approvals built in.",
    stars: 642, forks: 153, credits: "+187",
    tags: ["Sales"],
  },
  {
    id: "support",
    title: "Customer Support",
    author: "@helpdesk",
    iconKey: "clipboard",
    hue: HUE.cyan,
    desc: "Tickets, SLAs, macros, AI triage. Inbox-style queue with CSAT tracking.",
    stars: 938, forks: 221, credits: "+278",
    tags: ["Support"],
  },
  {
    id: "vendor",
    title: "Vendor Management",
    author: "@procure",
    iconKey: "cube",
    hue: HUE.teal,
    desc: "Vendors, contracts, renewals, spend caps. Auto-alert before auto-renew.",
    stars: 412, forks: 98, credits: "+118",
    tags: ["Finance"],
  },
  {
    id: "okr",
    title: "OKRs",
    author: "@align",
    iconKey: "trending",
    hue: HUE.orange,
    desc: "Objectives, key results, weekly check-ins. Roll-ups by team and exec.",
    stars: 781, forks: 187, credits: "+232",
    tags: ["People"],
  },
];

// ─── Ecosystem nodes ──────────────────────────────────────────────────────
// Personal: Sport (Apple Health-like) ↔ Food (calories, nutrition) ↔ AI Trainer
const ECO_PERSONAL = [
  {
    id: "sport",
    name: "Sport",
    sub: "Workouts, sleep, vitals",
    iconKey: "bolt",
    hue: HUE.rose,
    pos: { left: "2%",  top: "0%" },
    data: [["table", "workouts"], ["table", "vitals"]],
  },
  {
    id: "food",
    name: "Food",
    sub: "Calories + macros",
    iconKey: "flask",
    hue: HUE.green,
    pos: { right: "2%", top: "0%" },
    data: [["table", "meals"], ["ref", "→ vitals"]],
  },
  {
    id: "trainer",
    name: "AI Trainer",
    sub: "Personalized coaching",
    iconKey: "wand",
    hue: HUE.violet,
    pos: { left: "50%", top: "62%", transform: "translateX(-50%)" },
    data: [["ref", "→ workouts, meals"], ["job", "weekly plan"]],
  },
];

// Business: CRM ↔ Company ↔ HR (with edges flowing through the org)
const ECO_BUSINESS = [
  {
    id: "crm",
    name: "Sales CRM",
    sub: "Deals + accounts",
    iconKey: "users",
    hue: HUE.indigo,
    pos: { left: "2%",  top: "0%" },
    data: [["table", "deals"], ["ref", "→ company"]],
  },
  {
    id: "company",
    name: "Company",
    sub: "Org chart + people",
    iconKey: "building",
    hue: HUE.primary,
    pos: { right: "2%", top: "0%" },
    data: [["table", "people"], ["table", "reporting"]],
  },
  {
    id: "finances",
    name: "Finances",
    sub: "P&L, cash flow, runway",
    iconKey: "chart",
    hue: HUE.amber,
    pos: { left: "50%", top: "62%", transform: "translateX(-50%)" },
    data: [["ref", "→ deals (closed)"], ["job", "monthly close"]],
  },
];

window.HUE = HUE;
window.BUILTIN = BUILTIN;
window.MARKET_PERSONAL = MARKET_PERSONAL;
window.MARKET_BUSINESS = MARKET_BUSINESS;
window.ECO_PERSONAL = ECO_PERSONAL;
window.ECO_BUSINESS = ECO_BUSINESS;
// Back-compat (default to personal):
window.MARKET = MARKET_PERSONAL;
window.ECO = ECO_PERSONAL;
