// data.jsx — seed data for Everest mission control
// Mostly empty by design so the empty states show.
//
// CONTEXT DATA (TODAY_EVENTS, INBOX, NEWS) is FALLBACK ONLY.
// SchedulePanel, InboxPanel, and NewsPanel in dashboard.jsx fetch live data
// from /api/v1/context/calendar, /api/v1/context/inbox, /api/v1/context/news.
// These arrays are only used when those API calls fail (catch block fallback).

const PROJECTS = [
  {
    id: "policy-team",
    name: "Policy Team",
    codename: "PT–01 · NORTH RIDGE",
    description: "OSHA-related AI policy tracking system",
    vision:
      "A trusted ledger of every federal AI policy that touches workplace safety — searchable, citation-grade, updated within hours of any rule change.",
    goal: "Ship v1 of the OSHA policy tracker by end of Q3, covering all active proposed and final rules with full revision history.",
    lastWorked: "Worked today",
    lastWorkedAt: "2026-05-22",
    elevation: "14,505",     // mock altitude (Mt. Whitney vibes)
    coords: "47.3942°N · 122.4001°W",
    status: "Ascending",
    progress: 0.42,
    startDate: "Jan 06, 2026",
    endDate: "Sep 30, 2026",
    folder: "~/work/policy-team/",
    pinned: true,
    docs: [],   // empty
    team: [],   // empty
    notes: [],  // empty
    activity: [
      { when: "Today · 09:14", what: "Marked as worked today." },
      { when: "Yesterday", what: "Vision statement updated." },
      { when: "May 18", what: "Codename set to <b>PT–01</b>." },
      { when: "May 14", what: "Created expedition." },
    ],
  },
  {
    id: "corada-pro",
    name: "Corada Pro",
    codename: "CR–02 · SOUTH COL",
    description: "ADA policy tracking for Evan Terry & Associates",
    vision: "",                  // empty — show empty state inline
    goal: "",
    lastWorked: "3d ago",
    lastWorkedAt: "2026-05-19",
    elevation: "11,247",
    coords: "33.5186°N · 86.8104°W",
    status: "Holding",
    progress: 0.12,
    startDate: "",
    endDate: "",
    folder: "~/work/corada-pro/",
    pinned: false,
    docs: [],
    team: [],
    notes: [],
    activity: [
      { when: "May 19", what: "Last worked." },
      { when: "May 12", what: "Created expedition." },
    ],
  },
  {
    id: "opentrial",
    name: "OpenTrial",
    codename: "OT–03 · WESTERN CWM",
    description: "Open clinical-trial planning & execution with AI",
    vision: "",
    goal: "",
    lastWorked: "11d ago",
    lastWorkedAt: "2026-05-11",
    elevation: "8,902",
    coords: "27.9881°N · 86.9250°W",
    status: "Camp",
    progress: 0.05,
    startDate: "",
    endDate: "",
    folder: "~/work/opentrial/",
    pinned: false,
    docs: [],
    team: [],
    notes: [],
    activity: [
      { when: "May 11", what: "Last worked." },
      { when: "Apr 28", what: "Created expedition." },
    ],
  },
];

const TODAY_EVENTS = [
  { time: "09:00", title: "Standup — Policy Team", sub: "Zoom · 30m", now: false },
  { time: "11:30", title: "OSHA review prep", sub: "Solo block", now: true },
  { time: "14:00", title: "Evan Terry weekly", sub: "Corada Pro · 45m", now: false },
  { time: "16:30", title: "Trial design sync", sub: "OpenTrial · with Dr. Lin", now: false },
];

const INBOX = [
  {
    from: "Megan Cho",
    when: "07:42",
    subj: "Re: Final ruleset for the May docket",
    prev: "Pushed the redlines to the shared folder — let me know if the section 4 edits land before noon.",
    urgent: true,
  },
  {
    from: "Evan Terry",
    when: "Yesterday",
    subj: "Quick favor — ADA appendix",
    prev: "Could you check whether the appendix needs the 2024 amendments rolled in? Happy to defer to your read.",
    urgent: true,
  },
  {
    from: "Stripe",
    when: "Yesterday",
    subj: "Receipt for your subscription",
    prev: "Your monthly invoice for the Pro plan is attached. No action required.",
    urgent: false,
  },
  {
    from: "GitHub",
    when: "May 20",
    subj: "[opentrial] PR #84 needs your review",
    prev: "kasey requested your review on \"protocol-builder: support adaptive arms\".",
    urgent: false,
  },
];

const NEWS = [
  {
    src: "Stratechery",
    head: "The next platform shift is not what the labs think it is",
    summ: "Long read on why model providers keep over-rotating on agents while the real lock-in is happening at the data layer.",
  },
  {
    src: "Ben Evans",
    head: "Weekly: every chart looks like AI right now",
    summ: "Mobile, payments, search — all the curves are bending. Not all of them mean the same thing.",
  },
  {
    src: "TechCrunch",
    head: "Anthropic ships a smaller model, big benchmark gains",
    summ: "Haiku-class scoring within 3 pts of last year's flagships on reasoning suites at a fraction of the cost.",
  },
  {
    src: "Pitchbook",
    head: "Series B pace cools for the third straight month",
    summ: "Deal counts down 18% QoQ. AI-infra still the only sector posting growth.",
  },
];

const _now = new Date();
const TODAY_STR = _now.toLocaleDateString("en-US", { weekday:"long", year:"numeric", month:"long", day:"numeric" });
const _m = _now.toLocaleDateString("en-US", { month:"short" }).toUpperCase();
const _d = _now.getDate();
const _y = _now.getFullYear();
const TODAY_SHORT = `${_m} · ${_d} · ${_y}`;
const _start = new Date("2026-01-06");
const DAY_OF_EXPEDITION = "Day " + Math.max(1, Math.floor((_now - _start) / 86400000));
const WEATHER = "–";

window.EVEREST_DATA = {
  PROJECTS, TODAY_EVENTS, INBOX, NEWS,
  WEATHER, TODAY_STR, TODAY_SHORT, DAY_OF_EXPEDITION,
  USER: { name: "Patrick Bishop", initials: "PB" },
};
