// Mock data for Taskify

const PROJECTS = [
  { id: "inbox",    name: "Inbox",            hue: 220, icon: "tray" },
  { id: "acme",     name: "Acme Redesign",    hue: 28,  icon: "briefcase" },
  { id: "personal", name: "Personal",         hue: 142, icon: "home" },
  { id: "reading",  name: "Reading List",     hue: 282, icon: "book" },
  { id: "health",   name: "Health",           hue: 4,   icon: "heart" },
  { id: "side",     name: "Side Project",     hue: 200, icon: "sparkle" },
];

// Today is May 11, 2026 (Monday). Build dates relative to that.
const TODAY = new Date(2026, 4, 11, 9, 0);   // May 11, 2026 09:00
const d = (h, m = 0, dayOffset = 0) => {
  const x = new Date(TODAY);
  x.setDate(x.getDate() + dayOffset);
  x.setHours(h, m, 0, 0);
  return x.toISOString();
};

const TASKS = [
  {
    id: "t1",
    title: "Review Q2 design system audit",
    notes: "Focus on the new vibrancy tokens — confirm the foreground contrast passes WCAG AA on the translucent surfaces. Loop in Priya before signing off.",
    project: "acme",
    due: d(14, 30),
    estimate: 45,
    priority: "high",
    tags: ["design-system", "review"],
    subtasks: [
      { id: "s1", title: "Read audit PDF",         done: true  },
      { id: "s2", title: "Verify contrast tokens", done: false },
      { id: "s3", title: "Leave Figma comments",   done: false },
    ],
    links: [
      { label: "Figma — Audit",  url: "#" },
      { label: "Notion brief",   url: "#" },
    ],
    recurrence: null,
    completed: false,
  },
  {
    id: "t2",
    title: "Prep 1:1 talking points with Maya",
    notes: "Cover hiring pipeline, Q3 OKRs, and the proposal for design week.",
    project: "acme",
    due: d(11, 0),
    estimate: 15,
    priority: "medium",
    tags: ["1on1"],
    subtasks: [],
    links: [],
    recurrence: { every: "week", on: ["mon"] },
    completed: false,
  },
  {
    id: "t3",
    title: "Reply to Anthropic partner email",
    notes: "",
    project: "inbox",
    due: d(12, 0),
    estimate: 10,
    priority: "medium",
    tags: ["email"],
    subtasks: [],
    links: [],
    recurrence: null,
    completed: false,
  },
  {
    id: "t4",
    title: "Pick up dry cleaning",
    notes: "Ticket #4429 — closes at 7pm.",
    project: "personal",
    due: d(18, 0),
    estimate: 20,
    priority: "low",
    tags: ["errand"],
    subtasks: [],
    links: [],
    recurrence: null,
    completed: false,
  },
  {
    id: "t5",
    title: "Finish chapter 4 — Designing Data-Intensive Applications",
    notes: "Replication, leader-follower and leaderless.",
    project: "reading",
    due: d(21, 0),
    estimate: 60,
    priority: "low",
    tags: ["book"],
    subtasks: [],
    links: [],
    recurrence: null,
    completed: false,
  },
  {
    id: "t6",
    title: "Morning run — 5k easy",
    notes: "",
    project: "health",
    due: d(7, 0),
    estimate: 35,
    priority: "medium",
    tags: ["cardio"],
    subtasks: [],
    links: [],
    recurrence: { every: "day" },
    completed: true,
  },
  {
    id: "t7",
    title: "Write release notes for v0.18",
    notes: "Mention keyboard-only flow + calendar sync.",
    project: "side",
    due: d(16, 0, 1),
    estimate: 30,
    priority: "medium",
    tags: ["release"],
    subtasks: [
      { id: "s4", title: "Draft summary",    done: false },
      { id: "s5", title: "Collect changelog", done: false },
    ],
    links: [],
    recurrence: null,
    completed: false,
  },
  {
    id: "t8",
    title: "Renew passport",
    notes: "Expires September.",
    project: "personal",
    due: d(10, 0, 3),
    estimate: 90,
    priority: "high",
    tags: ["admin"],
    subtasks: [],
    links: [],
    recurrence: null,
    completed: false,
  },
  {
    id: "t9",
    title: "Plan team offsite agenda",
    notes: "",
    project: "acme",
    due: d(15, 0, 2),
    estimate: 60,
    priority: "medium",
    tags: ["offsite", "planning"],
    subtasks: [],
    links: [],
    recurrence: null,
    completed: false,
  },
  {
    id: "t10",
    title: "Submit expense report",
    notes: "April — flights, hotels, dinner with Lin.",
    project: "acme",
    due: d(17, 0, 4),
    estimate: 25,
    priority: "low",
    tags: ["admin"],
    subtasks: [],
    links: [],
    recurrence: { every: "month" },
    completed: false,
  },
  {
    id: "t11",
    title: "Therapy session",
    notes: "",
    project: "health",
    due: d(17, 30, 1),
    estimate: 50,
    priority: "medium",
    tags: ["appointment"],
    subtasks: [],
    links: [],
    recurrence: { every: "week", on: ["tue"] },
    completed: false,
  },
  {
    id: "t12",
    title: "Buy groceries",
    notes: "Eggs, oat milk, sourdough, basil.",
    project: "personal",
    due: d(19, 0),
    estimate: 30,
    priority: "low",
    tags: ["errand"],
    subtasks: [],
    links: [],
    recurrence: null,
    completed: false,
  },
];

const EVENTS = [
  {
    id: "e1",
    title: "Design crit — vibrancy tokens",
    start: d(10, 0),
    end:   d(10, 45),
    source: "google",
    attendees: 6,
    location: "Zoom",
    color: "#5B9CFF",
  },
  {
    id: "e2",
    title: "1:1 with Maya",
    start: d(11, 30),
    end:   d(12, 0),
    source: "google",
    attendees: 2,
    location: "Building 4 · Room Cypress",
    color: "#FF9F0A",
  },
  {
    id: "e3",
    title: "Lunch with Jordan",
    start: d(13, 0),
    end:   d(14, 0),
    source: "apple",
    attendees: 2,
    location: "Café Lune",
    color: "#30D158",
  },
  {
    id: "e4",
    title: "Q3 planning sync",
    start: d(15, 0),
    end:   d(16, 0),
    source: "outlook",
    attendees: 8,
    location: "Teams",
    color: "#BF5AF2",
  },
  {
    id: "e5",
    title: "Dentist",
    start: d(16, 30, 2),
    end:   d(17, 15, 2),
    source: "apple",
    attendees: 1,
    location: "Dr. Park",
    color: "#30D158",
  },
];

const TAGS = [
  "design-system","review","1on1","email","errand","book","cardio",
  "release","admin","offsite","planning","appointment",
];

window.TASKIFY_DATA = { PROJECTS, TASKS, EVENTS, TAGS, TODAY };
