// notifications-data.jsx — unified activity feed

const NOTIF_TYPES = {
  mention:   { label: "Mention",       icon: "MessageSq",   color: "#a25ddc" },
  assigned:  { label: "Assigned",      icon: "Users",  color: "#0073ea" },
  status:    { label: "Status change", icon: "Check",  color: "#00c875" },
  due:       { label: "Due soon",      icon: "Clock",  color: "#fdab3d" },
  overdue:   { label: "Overdue",       icon: "Alert",  color: "#e2445c" },
  sprint:    { label: "Sprint",        icon: "Lightning", color: "#037f4c" },
  ticket:    { label: "Ticket",        icon: "Inbox",  color: "#bb3354" },
  goal:      { label: "Goal",          icon: "Star",   color: "#5559df" },
};

// Source-of-truth feed (sorted newest first).
// bucket: "today" | "yesterday" | "earlier"
const NOTIFICATIONS = [
  // ── TODAY ────────────────────────────────────────────────────
  { id: "n01", bucket: "today", type: "mention", unread: true, at: "9:42 AM",
    actor: "mj", project: "checkout", projectColor: "var(--epic-1)",
    subject: { kind: "task", id: "t2", title: "Guest address autocomplete API" },
    body: "**@Aya** can you double-check the fallback path when the provider returns 5xx? I want to ship this today.",
    cta: "Reply" },

  { id: "n02", bucket: "today", type: "overdue", unread: true, at: "9:15 AM",
    actor: null, project: "checkout", projectColor: "var(--epic-1)",
    subject: { kind: "task", id: "t7", title: "Klarna BNPL integration" },
    body: "This task was due **yesterday** and is still in Blocked. You're the owner.",
    cta: "Open task" },

  { id: "n03", bucket: "today", type: "ticket", unread: true, at: "8:58 AM",
    actor: "hl", project: "checkout", projectColor: "var(--epic-1)",
    subject: { kind: "ticket", id: "T-2041", title: "Checkout timing out on Safari iOS 17" },
    body: "Ticket **escalated to P0** — 3 duplicate reports in the last 20 min. Assigned to you.",
    cta: "Open ticket" },

  { id: "n04", bucket: "today", type: "status", unread: true, at: "8:12 AM",
    actor: "le", project: "checkout", projectColor: "var(--epic-1)",
    subject: { kind: "task", id: "t3", title: "Skip-account upsell copy" },
    body: "Moved from **In Review → Done**. Ready to ship with the Guest epic.",
    cta: "Open task" },

  { id: "n05", bucket: "today", type: "assigned", unread: false, at: "7:40 AM",
    actor: "ay", project: "platform", projectColor: "var(--epic-5)",
    subject: { kind: "task", id: "tp9", title: "Rotate production TLS certificate" },
    body: "You assigned this to **Hannah Liu** · due **Apr 25**.",
    cta: "Open task" },

  { id: "n06", bucket: "today", type: "due", unread: false, at: "7:05 AM",
    actor: null, project: "checkout", projectColor: "var(--epic-1)",
    subject: { kind: "task", id: "t9", title: "PCI compliance audit checklist" },
    body: "Due **tomorrow** · 3 subtasks still In Review.",
    cta: "Open task" },

  // ── YESTERDAY ─────────────────────────────────────────────────
  { id: "n07", bucket: "yesterday", type: "sprint", unread: false, at: "Yesterday, 6:00 PM",
    actor: null, project: "checkout", projectColor: "var(--epic-1)",
    subject: { kind: "sprint", id: "s24", title: "Sprint 24 · Web" },
    body: "Sprint **started** · 14 tasks, 47 points committed · runs through **Apr 20**.",
    cta: "View sprint" },

  { id: "n08", bucket: "yesterday", type: "mention", unread: false, at: "Yesterday, 4:22 PM",
    actor: "pr", project: "mobile", projectColor: "var(--epic-4)",
    subject: { kind: "task", id: "t11", title: "iOS sheet presentation" },
    body: "**@Aya** the sheet animation feels snappy now but I'm worried about the Safari fallback. Want to pair on it?",
    cta: "Reply" },

  { id: "n09", bucket: "yesterday", type: "goal", unread: false, at: "Yesterday, 2:10 PM",
    actor: null, project: null, projectColor: "#5559df",
    subject: { kind: "goal", id: "g-q2-revenue", title: "Q2: Lift checkout conversion to 3.8%" },
    body: "Your **weekly update** is due Friday. Current: 3.41% (↑0.12 WoW).",
    cta: "Update goal" },

  { id: "n10", bucket: "yesterday", type: "status", unread: false, at: "Yesterday, 11:48 AM",
    actor: "ts", project: "checkout", projectColor: "var(--epic-1)",
    subject: { kind: "task", id: "t7", title: "Klarna BNPL integration" },
    body: "Moved from **In Progress → Blocked**. Waiting on Klarna API keys from finance.",
    cta: "Open task" },

  { id: "n11", bucket: "yesterday", type: "ticket", unread: false, at: "Yesterday, 9:30 AM",
    actor: "df", project: "platform", projectColor: "var(--epic-5)",
    subject: { kind: "ticket", id: "T-2033", title: "Enterprise SSO fails on IdP-initiated flow" },
    body: "Ticket assigned to you by Dmitri · P1 · first response SLA **in 3h**.",
    cta: "Open ticket" },

  // ── EARLIER ─────────────────────────────────────────────────
  { id: "n12", bucket: "earlier", type: "sprint", unread: false, at: "Mon · 6:00 PM",
    actor: null, project: "checkout", projectColor: "var(--epic-1)",
    subject: { kind: "sprint", id: "s23", title: "Sprint 23 · Web" },
    body: "Sprint **completed** · 38 of 42 points delivered · 4 tasks carried over to Sprint 24.",
    cta: "Open retro" },

  { id: "n13", bucket: "earlier", type: "assigned", unread: false, at: "Mon · 2:14 PM",
    actor: "mj", project: "checkout", projectColor: "var(--epic-1)",
    subject: { kind: "task", id: "t2", title: "Guest address autocomplete API" },
    body: "Marcus assigned this to **you** and **@Marcus** · Sprint 24 · **8 pts**.",
    cta: "Open task" },

  { id: "n14", bucket: "earlier", type: "mention", unread: false, at: "Sun · 8:12 PM",
    actor: "nk", project: "growth", projectColor: "var(--epic-3)",
    subject: { kind: "doc", id: "d-experiment-plan", title: "Experimentation platform — RFC" },
    body: "**@Aya** I pushed a v2 with your notes addressed. Lmk if I missed anything.",
    cta: "Open doc" },

  { id: "n15", bucket: "earlier", type: "due", unread: false, at: "Sun · 9:00 AM",
    actor: null, project: "mobile", projectColor: "var(--epic-4)",
    subject: { kind: "task", id: "t14", title: "Performance: TTI under 2s" },
    body: "Due **Apr 25** · 3 of 5 subtasks done.",
    cta: "Open task" },

  { id: "n16", bucket: "earlier", type: "goal", unread: false, at: "Fri · 10:00 AM",
    actor: null, project: null, projectColor: "#5559df",
    subject: { kind: "goal", id: "g-q2-reliability", title: "Q2: 99.95% checkout uptime" },
    body: "Confidence score auto-changed **On track → At risk** after 2 incidents this week.",
    cta: "Update goal" },
];

Object.assign(window, { NOTIFICATIONS, NOTIF_TYPES });
