// SeedData — user-authored cost schedules and extra projects baked
// into the app so every install starts with this content. Regenerated from
// an archive JSON export. localStorage still wins if populated.

const SEED_SCHEDULES = {
  "p-brunswick": {
    "title": "Materials Cost Schedule",
    "options": [
      {
        "id": "o-mel",
        "name": "Melamine-faced MDF"
      },
      {
        "id": "o-ven",
        "name": "Veneer-faced MDF"
      },
      {
        "id": "o-ced",
        "name": "Cedar Castellation"
      },
      {
        "id": "o-vj",
        "name": "Painted VJ MDF"
      }
    ],
    "components": [
      {
        "id": "k-01",
        "name": "Base Fronts",
        "qty": "4.2",
        "unit": "m²",
        "category": "Kitchen joinery",
        "count": null,
        "size": "4.2"
      },
      {
        "id": "k-02",
        "name": "Base Top",
        "qty": "2.8",
        "unit": "m²",
        "category": "Kitchen joinery",
        "count": null,
        "size": "2.8"
      },
      {
        "id": "k-03",
        "name": "Top Sliding Panels",
        "qty": "3.6",
        "unit": "m²",
        "category": "Kitchen joinery",
        "count": null,
        "size": "3.6"
      },
      {
        "id": "k-04",
        "name": "Cover Strips",
        "qty": "6.4",
        "unit": "l/m",
        "category": "Kitchen joinery",
        "count": null,
        "size": "6.4"
      },
      {
        "id": "l-01",
        "name": "Top Sides",
        "qty": "1.9",
        "unit": "m²",
        "category": "Living joinery",
        "count": null,
        "size": "1.9"
      },
      {
        "id": "l-02",
        "name": "Top Shelves",
        "qty": "2.4",
        "unit": "m²",
        "category": "Living joinery",
        "count": null,
        "size": "2.4"
      },
      {
        "id": "l-03",
        "name": "Top Rear Panel",
        "qty": "3.1",
        "unit": "m²",
        "category": "Living joinery",
        "count": null,
        "size": "3.1"
      }
    ],
    "cells": {
      "o-mel:k-01": {
        "materialId": "m-020"
      },
      "o-mel:k-02": {
        "materialId": "m-020"
      },
      "o-mel:k-03": {
        "materialId": "m-020"
      },
      "o-mel:k-04": {
        "materialId": "m-032"
      },
      "o-mel:l-01": {
        "materialId": "m-020"
      },
      "o-mel:l-02": {
        "materialId": "m-020"
      },
      "o-mel:l-03": {
        "materialId": "m-020"
      },
      "o-ven:k-01": {
        "materialId": "m-021"
      },
      "o-ven:k-02": {
        "materialId": "m-020"
      },
      "o-ven:k-03": {
        "materialId": "m-021"
      },
      "o-ven:l-01": {
        "materialId": "m-020"
      },
      "o-ven:l-02": {
        "materialId": "m-021"
      },
      "o-ced:k-01": {
        "materialId": "m-003"
      },
      "o-ced:k-03": {
        "materialId": "m-003"
      },
      "o-ced:l-01": {
        "materialId": "m-003"
      },
      "o-vj:k-01": {
        "materialId": "m-022"
      },
      "o-vj:k-03": {
        "materialId": "m-022"
      },
      "o-vj:l-01": {
        "materialId": "m-022"
      },
      "o-vj:l-03": {
        "materialId": "m-022"
      }
    }
  },
  "p-hawthorn": {
    "title": "Materials Cost Schedule",
    "options": [
      {
        "id": "o-1",
        "name": "Option 1"
      }
    ],
    "components": [],
    "cells": {}
  },
  "p-fitzroy": {
    "title": "Materials Cost Schedule",
    "options": [
      {
        "id": "o-1",
        "name": "Option 1"
      }
    ],
    "components": [],
    "cells": {}
  },
  "p-1776916148400": {
    "title": "Materials Cost Schedule",
    "options": [
      {
        "id": "o-1",
        "name": "Blackbutt Veneer MDF"
      },
      {
        "id": "o-1776916476825",
        "name": "VJ MDF"
      },
      {
        "id": "o-1776958835736",
        "name": "Cedar Castellation"
      },
      {
        "id": "o-1776959502982",
        "name": "Polytec Melamine"
      }
    ],
    "components": [
      {
        "id": "c-nrz09teos",
        "name": "Front Panels",
        "count": "5",
        "size": 0.582,
        "unit": "m²",
        "category": "Joinery"
      },
      {
        "id": "c-56qvyyfi8",
        "name": "Base Top",
        "count": "1",
        "size": "1.895",
        "unit": "m²",
        "category": "Joinery"
      },
      {
        "id": "c-tdah3wfia",
        "name": "Sliding Panel",
        "count": "3",
        "size": "0.593",
        "unit": "m²",
        "category": "Joinery"
      },
      {
        "id": "c-u9kxe2b36",
        "name": "Side Panels",
        "count": "2",
        "size": "0.640",
        "unit": "m²",
        "category": "Joinery"
      },
      {
        "id": "c-hc1sz1rn2",
        "name": "Shelf Rear",
        "count": "1",
        "size": "1.160",
        "unit": "m²",
        "category": "Joinery"
      },
      {
        "id": "c-ismxhhdnr",
        "name": "Shelves",
        "count": "4",
        "size": "0.342",
        "unit": "m²",
        "category": "Joinery"
      },
      {
        "id": "c-l0fu7c3do",
        "name": "Shelf Right",
        "count": "1",
        "size": "0.302",
        "unit": "m²",
        "category": "Joinery"
      },
      {
        "id": "c-l34pjq8k5",
        "name": "Rear 1",
        "count": "1",
        "size": "0.062",
        "unit": "m²",
        "category": "Joinery"
      },
      {
        "id": "c-6wblpxhve",
        "name": "Rear 2",
        "count": "1",
        "size": "0.405",
        "unit": "m²",
        "category": "Joinery"
      },
      {
        "id": "c-p5bynaqxf",
        "name": "Sticks",
        "count": "8",
        "size": "1",
        "unit": "m²",
        "category": "Joinery"
      },
      {
        "id": "c-kb3017vhy",
        "name": "LED Strip Lighting",
        "count": "4",
        "size": "1.12",
        "unit": "l/m",
        "category": "Joinery"
      }
    ],
    "cells": {
      "o-1:c-nrz09teos": {
        "materialId": "m-bne-11"
      },
      "o-1776916476825:c-nrz09teos": {
        "materialId": "m-1776920544831"
      },
      "o-1:c-56qvyyfi8": {
        "materialId": "m-bne-11"
      },
      "o-1:c-u9kxe2b36": {
        "materialId": "m-bne-11"
      },
      "o-1:c-hc1sz1rn2": {
        "materialId": "m-bne-11"
      },
      "o-1:c-ismxhhdnr": {
        "materialId": "m-bne-11"
      },
      "o-1:c-l0fu7c3do": {
        "materialId": "m-bne-11"
      },
      "o-1:c-l34pjq8k5": {
        "materialId": "m-bne-11"
      },
      "o-1:c-6wblpxhve": {
        "materialId": "m-bne-11"
      },
      "o-1:c-tdah3wfia": {
        "materialId": "m-bne-11"
      },
      "o-1:c-kb3017vhy": {
        "materialId": "m-bne-40"
      },
      "o-1:c-p5bynaqxf": {
        "materialId": "m-bne-22"
      },
      "o-1776916476825:c-p5bynaqxf": {
        "materialId": "m-bne-23"
      },
      "o-1776916476825:c-kb3017vhy": {
        "materialId": "m-bne-40"
      },
      "o-1776916476825:c-6wblpxhve": {
        "materialId": "m-1776920544831"
      },
      "o-1776916476825:c-l34pjq8k5": {
        "materialId": "m-1776920544831"
      },
      "o-1776916476825:c-56qvyyfi8": {
        "materialId": "m-1776920544831"
      },
      "o-1776916476825:c-hc1sz1rn2": {
        "materialId": "m-1776920544831"
      },
      "o-1776916476825:c-l0fu7c3do": {
        "materialId": "m-1776920544831"
      },
      "o-1776916476825:c-ismxhhdnr": {
        "materialId": "m-bne-11"
      },
      "o-1776916476825:c-u9kxe2b36": {
        "materialId": "m-1776920544831"
      },
      "o-1776916476825:c-tdah3wfia": {
        "materialId": "m-1776920544831"
      },
      "o-1776958835736:c-nrz09teos": {
        "materialId": "m-bne-20"
      },
      "o-1776958835736:c-56qvyyfi8": {
        "materialId": "m-bne-20"
      },
      "o-1776958835736:c-u9kxe2b36": {
        "materialId": "m-bne-20"
      },
      "o-1776958835736:c-hc1sz1rn2": {
        "materialId": "m-bne-20"
      },
      "o-1776958835736:c-ismxhhdnr": {
        "materialId": "m-bne-20"
      },
      "o-1776958835736:c-l0fu7c3do": {
        "materialId": "m-bne-20"
      },
      "o-1776958835736:c-l34pjq8k5": {
        "materialId": "m-bne-20"
      },
      "o-1776958835736:c-6wblpxhve": {
        "materialId": "m-bne-20"
      },
      "o-1776958835736:c-tdah3wfia": {
        "materialId": "m-bne-20"
      },
      "o-1776958835736:c-kb3017vhy": {
        "materialId": "m-bne-40"
      },
      "o-1776958835736:c-p5bynaqxf": {
        "materialId": "m-bne-20"
      },
      "o-1776959502982:c-nrz09teos": {
        "materialId": "m-1776984687634"
      },
      "o-1776959502982:c-56qvyyfi8": {
        "materialId": "m-1776984687634"
      },
      "o-1776959502982:c-u9kxe2b36": {
        "materialId": "m-1776984687634"
      },
      "o-1776959502982:c-hc1sz1rn2": {
        "materialId": "m-1776984687634"
      },
      "o-1776959502982:c-ismxhhdnr": {
        "materialId": "m-1776984687634"
      },
      "o-1776959502982:c-l0fu7c3do": {
        "materialId": "m-1776984687634"
      },
      "o-1776959502982:c-l34pjq8k5": {
        "materialId": "m-1776984687634"
      },
      "o-1776959502982:c-6wblpxhve": {
        "materialId": "m-1776984687634"
      },
      "o-1776959502982:c-tdah3wfia": {
        "materialId": "m-1776984687634"
      },
      "o-1776959502982:c-kb3017vhy": {
        "materialId": "m-bne-40"
      },
      "o-1776959502982:c-p5bynaqxf": {
        "materialId": "m-1776984687634"
      }
    }
  }
};

// Projects created in-app (not in the original PROJECTS seed). Merged into
// PROJECTS so every install knows about them.
const SEED_EXTRA_PROJECTS = [
  {
    "id": "p-1776916148400",
    "code": "HAJ-103.1",
    "name": "Youtube Studio",
    "client": "",
    "location": "",
    "type": "",
    "stage": "Concept",
    "budget": "$5000",
    "lead": "",
    "commenced": "",
    "completion": "",
    "description": "",
    "libraryIds": [
      "lib-bne-2026"
    ]
  }
];

// Merge extra projects into window.PROJECTS so they appear on every install.
// Runs after data.jsx set window.PROJECTS.
if (window.PROJECTS && Array.isArray(SEED_EXTRA_PROJECTS)) {
  const known = new Set(window.PROJECTS.map(p => p.id));
  SEED_EXTRA_PROJECTS.forEach(p => {
    if (!known.has(p.id)) {
      window.PROJECTS.push({ ...p, libraryIds: p.libraryIds || [] });
    }
  });
}

Object.assign(window, { SEED_SCHEDULES, SEED_EXTRA_PROJECTS });
