import type { WorkspaceData } from "./types";

const T0 = "2026-09-10T12:00:00.000Z";

export const SEED: WorkspaceData = {
  focusTaskId: "task_canvas",
  projects: [
    {
      id: "proj_relaunch",
      name: "Fieldbook launch",
      description:
        "Stand up the working ledger: projects, tasks, notes, reminders, boards, and flows that all feed each other. Treat this as the first real project in the book.",
      status: "active",
      createdAt: "2026-09-01T09:00:00.000Z",
      updatedAt: T0,
    },
    {
      id: "proj_ops",
      name: "Studio operations",
      description:
        "Recurring ops — invoices, vendor follow-ups, and the weekly status note. Smaller, always on.",
      status: "active",
      createdAt: "2026-08-12T09:00:00.000Z",
      updatedAt: T0,
    },
    {
      id: "proj_archive",
      name: "Q2 teardown",
      description: "Closed. Kept for the notes and the flowchart of what we actually shipped.",
      status: "done",
      createdAt: "2026-04-02T09:00:00.000Z",
      updatedAt: "2026-06-30T18:00:00.000Z",
    },
  ],
  tasks: [
    {
      id: "task_canvas",
      title: "Finish the board + flow canvas",
      body: "Pen, stickies, shapes, connectors. Converting a node into a task has to land in this project.",
      status: "doing",
      priority: "high",
      projectId: "proj_relaunch",
      dueAt: "2026-09-10T17:00:00.000Z",
      reminderId: "rem_canvas",
      noteIds: ["note_canvas"],
      createdAt: "2026-09-08T11:00:00.000Z",
      updatedAt: T0,
    },
    {
      id: "task_ledger",
      title: "Match Primer: GitHub tokens, 6px radius, green primary, blue accent",
      body: "Canvas #fff, muted #f6f8fa, accent #0969da, primary #1f883d. 6px radii. Status pills. Light + dark.",
      status: "done",
      priority: "high",
      projectId: "proj_relaunch",
      dueAt: "2026-09-09T18:00:00.000Z",
      reminderId: null,
      noteIds: ["note_tokens"],
      createdAt: "2026-09-07T10:00:00.000Z",
      updatedAt: "2026-09-09T16:40:00.000Z",
    },
    {
      id: "task_links",
      title: "Wire cross-links: note → task → reminder → board",
      body: "Every entity can spawn another. Nothing should be an island.",
      status: "todo",
      priority: "high",
      projectId: "proj_relaunch",
      dueAt: "2026-09-11T17:00:00.000Z",
      reminderId: "rem_links",
      noteIds: ["note_canvas"],
      createdAt: "2026-09-08T11:20:00.000Z",
      updatedAt: T0,
    },
    {
      id: "task_mobile",
      title: "Tighten the 390px shell",
      body: "Bottom nav, no horizontal overflow, 44px targets.",
      status: "todo",
      priority: "med",
      projectId: "proj_relaunch",
      dueAt: "2026-09-12T17:00:00.000Z",
      reminderId: null,
      noteIds: [],
      createdAt: "2026-09-09T09:00:00.000Z",
      updatedAt: T0,
    },
    {
      id: "task_invoice",
      title: "Send September invoice to Northwind",
      body: "Draft is in the ops note. Confirm hours against the board.",
      status: "todo",
      priority: "med",
      projectId: "proj_ops",
      dueAt: "2026-09-11T12:00:00.000Z",
      reminderId: "rem_invoice",
      noteIds: ["note_ops"],
      createdAt: "2026-09-04T14:00:00.000Z",
      updatedAt: T0,
    },
    {
      id: "task_overdue",
      title: "Call the millwork shop",
      body: "Lead time slipped. Need a firm date before Friday.",
      status: "todo",
      priority: "high",
      projectId: "proj_ops",
      dueAt: "2026-09-08T16:00:00.000Z",
      reminderId: "rem_mill",
      noteIds: [],
      createdAt: "2026-09-03T10:00:00.000Z",
      updatedAt: T0,
    },
  ],
  notes: [
    {
      id: "note_tokens",
      title: "Primer tokens",
      body: "GitHub Primer language, copied from the AkeneoFlow ledger.\n\nLight: canvas #ffffff, muted #f6f8fa, ink #1f2328, muted text #59636e, border #d0d7de.\nAccent (links/focus) #0969da. Primary actions are success green #1f883d.\nRadius 6px. Pills 2em. System sans + SF Mono. Light and dark via data-theme.\n\nTabular numerals in mono. Status as pills, not chrome. Hairline borders, one small shadow.",
      tags: ["design", "ledger"],
      projectId: "proj_relaunch",
      taskIds: ["task_ledger"],
      createdAt: "2026-09-07T09:30:00.000Z",
      updatedAt: "2026-09-09T16:40:00.000Z",
    },
    {
      id: "note_canvas",
      title: "Canvas contract",
      body: "One engine for whiteboard and flowchart.\n\nWhiteboard: pen, sticky, rect, ellipse, text.\nFlow: start, process, decision, document, task card — plus connectors on ports.\n\nA sticky or a process node can be promoted to a task. The node keeps a linkedTaskId so the board stays the map of the work.\n\nSpace-drag pans. Wheel zooms around the cursor. Delete removes the selection.",
      tags: ["canvas", "spec"],
      projectId: "proj_relaunch",
      taskIds: ["task_canvas", "task_links"],
      createdAt: "2026-09-08T10:00:00.000Z",
      updatedAt: T0,
    },
    {
      id: "note_ops",
      title: "September hours",
      body: "Northwind — 18.5h design, 11h build.\nMillwork follow-up still open (see overdue task).\n\nInvoice draft:\n- Design exploration  18.5 × 140\n- Implementation      11.0 × 140",
      tags: ["ops", "invoice"],
      projectId: "proj_ops",
      taskIds: ["task_invoice"],
      createdAt: "2026-09-04T13:00:00.000Z",
      updatedAt: T0,
    },
    {
      id: "note_scratch",
      title: "Unfiled scratch",
      body: "A note with no project on purpose. Extract a task from here to see the link form.",
      tags: ["inbox"],
      projectId: null,
      taskIds: [],
      createdAt: "2026-09-10T08:10:00.000Z",
      updatedAt: T0,
    },
  ],
  reminders: [
    {
      id: "rem_canvas",
      title: "Finish the board + flow canvas",
      dueAt: "2026-09-10T17:00:00.000Z",
      done: false,
      taskId: "task_canvas",
      projectId: "proj_relaunch",
      createdAt: "2026-09-08T11:00:00.000Z",
    },
    {
      id: "rem_links",
      title: "Wire cross-links",
      dueAt: "2026-09-11T09:00:00.000Z",
      done: false,
      taskId: "task_links",
      projectId: "proj_relaunch",
      createdAt: "2026-09-08T11:20:00.000Z",
    },
    {
      id: "rem_invoice",
      title: "Send September invoice to Northwind",
      dueAt: "2026-09-11T12:00:00.000Z",
      done: false,
      taskId: "task_invoice",
      projectId: "proj_ops",
      createdAt: "2026-09-04T14:00:00.000Z",
    },
    {
      id: "rem_mill",
      title: "Call the millwork shop",
      dueAt: "2026-09-08T16:00:00.000Z",
      done: false,
      taskId: "task_overdue",
      projectId: "proj_ops",
      createdAt: "2026-09-03T10:00:00.000Z",
    },
    {
      id: "rem_standup",
      title: "Weekly studio standup",
      dueAt: "2026-09-12T14:30:00.000Z",
      done: false,
      taskId: null,
      projectId: "proj_ops",
      createdAt: "2026-09-01T09:00:00.000Z",
    },
  ],
  scratch: [
    {
      id: "jot_primer",
      text: "Check the 6px radius on the dialog footer too",
      color: 1,
      createdAt: "2026-09-10T11:40:00.000Z",
      updatedAt: T0,
    },
    {
      id: "jot_dana",
      text: "Ask Dana whether flows need swimlanes\n(don't do it now)",
      color: 3,
      createdAt: "2026-09-10T11:20:00.000Z",
      updatedAt: T0,
    },
  ],
  waiting: [
    {
      id: "wait_quote",
      title: "Revised quote for the shelving run",
      who: "Millwork shop",
      notes: "Asked for oak and birch options. They said early next week.",
      projectId: "proj_ops",
      since: "2026-09-02T15:00:00.000Z",
      followUpAt: "2026-09-08T09:00:00.000Z",
      nudges: 1,
      lastNudgedAt: "2026-09-05T10:30:00.000Z",
      done: false,
      doneAt: null,
      createdAt: "2026-09-02T15:00:00.000Z",
      updatedAt: T0,
    },
    {
      id: "wait_signoff",
      title: "Sign-off on the board + flow canvas spec",
      who: "Dana",
      notes: "",
      projectId: "proj_relaunch",
      since: "2026-09-09T11:00:00.000Z",
      followUpAt: "2026-09-12T09:00:00.000Z",
      nudges: 0,
      lastNudgedAt: null,
      done: false,
      doneAt: null,
      createdAt: "2026-09-09T11:00:00.000Z",
      updatedAt: T0,
    },
  ],
  boards: [
    {
      id: "board_launch",
      title: "Launch wall",
      kind: "board",
      projectId: "proj_relaunch",
      createdAt: "2026-09-08T12:00:00.000Z",
      updatedAt: T0,
      strokes: [
        {
          id: "stk_1",
          color: "#0969da",
          width: 2,
          points: [90, 420, 140, 400, 210, 410, 280, 390, 340, 400],
        },
      ],
      nodes: [
        {
          id: "n_sticky_1",
          type: "sticky",
          x: 80,
          y: 80,
          w: 180,
          h: 140,
          text: "Paper, ink, navy.\nNo pills.",
          fill: "#fff8c5",
        },
        {
          id: "n_sticky_2",
          type: "sticky",
          x: 290,
          y: 70,
          w: 200,
          h: 150,
          text: "Promote this sticky\nto a task →",
          fill: "#dafbe1",
          linkedTaskId: "task_links",
        },
        {
          id: "n_sticky_3",
          type: "sticky",
          x: 80,
          y: 250,
          w: 220,
          h: 130,
          text: "Today is the canvas.\nTomorrow is the links.",
          fill: "#ddf4ff",
        },
        {
          id: "n_text_1",
          type: "text",
          x: 340,
          y: 280,
          w: 240,
          h: 40,
          text: "Fieldbook — working ledger",
        },
      ],
      edges: [],
    },
    {
      id: "flow_ship",
      title: "Ship Fieldbook",
      kind: "flow",
      projectId: "proj_relaunch",
      createdAt: "2026-09-08T12:30:00.000Z",
      updatedAt: T0,
      strokes: [],
      nodes: [
        {
          id: "f_start",
          type: "start",
          x: 40,
          y: 180,
          w: 120,
          h: 56,
          text: "Start",
        },
        {
          id: "f_tokens",
          type: "process",
          x: 220,
          y: 80,
          w: 180,
          h: 72,
          text: "Lock ledger tokens",
          linkedTaskId: "task_ledger",
        },
        {
          id: "f_canvas",
          type: "process",
          x: 220,
          y: 200,
          w: 180,
          h: 72,
          text: "Build the canvas",
          linkedTaskId: "task_canvas",
        },
        {
          id: "f_links",
          type: "process",
          x: 220,
          y: 320,
          w: 180,
          h: 72,
          text: "Cross-link entities",
          linkedTaskId: "task_links",
        },
        {
          id: "f_decide",
          type: "decision",
          x: 460,
          y: 180,
          w: 160,
          h: 120,
          text: "Hold for mobile?",
        },
        {
          id: "f_mobile",
          type: "taskcard",
          x: 700,
          y: 80,
          w: 180,
          h: 80,
          text: "Tighten 390px shell",
          linkedTaskId: "task_mobile",
        },
        {
          id: "f_ship",
          type: "document",
          x: 700,
          y: 280,
          w: 180,
          h: 80,
          text: "Ship the ledger",
        },
      ],
      edges: [
        {
          id: "e1",
          from: "f_start",
          to: "f_tokens",
          fromPort: "e",
          toPort: "w",
          label: "",
        },
        {
          id: "e2",
          from: "f_start",
          to: "f_canvas",
          fromPort: "e",
          toPort: "w",
          label: "",
        },
        {
          id: "e3",
          from: "f_start",
          to: "f_links",
          fromPort: "e",
          toPort: "w",
          label: "",
        },
        {
          id: "e4",
          from: "f_tokens",
          to: "f_decide",
          fromPort: "e",
          toPort: "w",
          label: "",
        },
        {
          id: "e5",
          from: "f_canvas",
          to: "f_decide",
          fromPort: "e",
          toPort: "w",
          label: "",
        },
        {
          id: "e6",
          from: "f_links",
          to: "f_decide",
          fromPort: "e",
          toPort: "w",
          label: "",
        },
        {
          id: "e7",
          from: "f_decide",
          to: "f_mobile",
          fromPort: "n",
          toPort: "w",
          label: "yes",
        },
        {
          id: "e8",
          from: "f_decide",
          to: "f_ship",
          fromPort: "s",
          toPort: "w",
          label: "later",
        },
        {
          id: "e9",
          from: "f_mobile",
          to: "f_ship",
          fromPort: "s",
          toPort: "n",
          label: "",
        },
      ],
    },
  ],
};
