// Static seed data for the wireframe prototype
const CATEGORIES = [
  { id: "all",        label: "All Items" },
  { id: "policies",   label: "Policies" },
  { id: "handbooks",  label: "Handbooks" },
  { id: "h_and_s",    label: "Health & Safety" },
  { id: "training",   label: "Training" },
  { id: "compliance", label: "Compliance" },
  { id: "hr",         label: "HR Forms" },
  { id: "comms",      label: "Comms" },
];

const ASSET_TYPES = {
  pdf:        { label: "PDF",          verb: "Open" },
  download:   { label: "Download",     verb: "Download" },
  form:       { label: "Form",         verb: "Complete" },
  video:      { label: "Video",        verb: "Watch" },
  link:       { label: "Link",         verb: "Open" },
  acknowledge:{ label: "Acknowledge",  verb: "Read & Confirm" },
};

const SEED_ASSETS = [
  {
    id: "a01",
    title: "Code of Conduct & Ethics",
    type: "acknowledge",
    category: "policies",
    desc: "Annual acknowledgement of company-wide standards of conduct, expected behaviour and reporting procedures.",
    updated: "2026-04-12",
    requiredBy: "2026-05-15",
    required: true,
    pages: 14,
    body: "ack",
  },
  {
    id: "a02",
    title: "Annual Health & Safety Declaration",
    type: "form",
    category: "h_and_s",
    desc: "Confirm your workspace setup, hazards awareness and emergency contact procedures.",
    updated: "2026-04-02",
    requiredBy: "2026-05-01",
    required: true,
    fields: 6,
    body: "form",
  },
  {
    id: "a03",
    title: "Employee Handbook 2026",
    type: "pdf",
    category: "handbooks",
    desc: "Complete guide to company policies, benefits, working hours and procedures. Replaces 2025 edition.",
    updated: "2026-03-28",
    pages: 84,
    body: "pdf",
  },
  {
    id: "a04",
    title: "Fire Safety & Evacuation Training",
    type: "video",
    category: "training",
    desc: "Mandatory 12-minute training on fire wardens, evacuation routes and assembly points.",
    updated: "2026-02-18",
    requiredBy: "2026-05-30",
    required: true,
    duration: "12:34",
    body: "video",
  },
  {
    id: "a05",
    title: "GDPR Awareness Refresher",
    type: "form",
    category: "compliance",
    desc: "Six-question quiz reviewing data handling, subject rights and breach reporting.",
    updated: "2026-03-10",
    fields: 6,
    body: "form",
  },
  {
    id: "a06",
    title: "Q2 Town Hall Recording",
    type: "video",
    category: "comms",
    desc: "Recording of the all-hands meeting from 11 April 2026 with Q&A timestamps.",
    updated: "2026-04-15",
    duration: "47:08",
    body: "video",
  },
  {
    id: "a07",
    title: "Expense Claim Form (April)",
    type: "download",
    category: "hr",
    desc: "Editable spreadsheet template for monthly expense submissions.",
    updated: "2026-04-01",
    fileSize: "82 KB",
    fileExt: "XLSX",
    body: "download",
  },
  {
    id: "a08",
    title: "Whistleblowing Policy",
    type: "pdf",
    category: "policies",
    desc: "Procedures for raising concerns confidentially and protections under the policy.",
    updated: "2026-01-08",
    pages: 11,
    body: "pdf",
  },
  {
    id: "a09",
    title: "Display Screen Equipment Self-Assessment",
    type: "form",
    category: "h_and_s",
    desc: "Workstation assessment covering posture, screen, keyboard, lighting and breaks.",
    updated: "2026-03-22",
    fields: 8,
    body: "form",
  },
  {
    id: "a10",
    title: "Diversity & Inclusion Hub",
    type: "link",
    category: "comms",
    desc: "External resource portal with toolkits, employee networks and event calendar.",
    updated: "2026-03-05",
    url: "external.example.com/d-and-i",
    body: "link",
  },
  {
    id: "a11",
    title: "Remote Working Policy",
    type: "acknowledge",
    category: "policies",
    desc: "Guidelines for hybrid working, equipment, security and time recording.",
    updated: "2026-02-14",
    pages: 6,
    body: "ack",
  },
  {
    id: "a12",
    title: "Manual Handling — Refresher Training",
    type: "video",
    category: "training",
    desc: "Brief refresher on safe lifting, posture and risk assessment.",
    updated: "2026-04-22",
    duration: "08:12",
    body: "video",
  },
];

// Seed read state — pre-mark a couple as read so progress isn't 0
const SEED_READ = { a08: true, a07: true, a10: true };

// Form templates per asset id
const FORM_TEMPLATES = {
  a02: {
    title: "Annual Health & Safety Declaration",
    questions: [
      { id: "q1", type: "yesno", q: "I have completed an inspection of my primary workspace this year." },
      { id: "q2", type: "yesno", q: "All electrical equipment in my workspace is in good working order." },
      { id: "q3", type: "yesno", q: "I am aware of the location of the nearest fire exit and assembly point." },
      { id: "q4", type: "single", q: "How frequently do you take screen breaks during a working day?", options: ["Every 30 minutes", "Hourly", "Every 2 hours", "Less often"] },
      { id: "q5", type: "multi", q: "Which of the following hazards have you identified in your workspace? (select all that apply)", options: ["Trip hazards", "Cable management", "Inadequate lighting", "Posture / chair", "Ventilation", "None"] },
      { id: "q6", type: "text", q: "Please describe any outstanding concerns or required adjustments.", placeholder: "Type your response..." },
    ],
  },
  a05: {
    title: "GDPR Awareness Refresher",
    questions: [
      { id: "q1", type: "single", q: "How long must we retain employee records after termination?",
        options: ["1 year", "3 years", "6 years", "Indefinitely"] },
      { id: "q2", type: "single", q: "What is the legal window for reporting a personal data breach to the supervisory authority?",
        options: ["24 hours", "72 hours", "7 days", "30 days"] },
      { id: "q3", type: "yesno", q: "Personal email addresses can be used to share customer data when company email is unavailable." },
      { id: "q4", type: "multi", q: "Which of the following count as personal data under GDPR?", options: ["IP address", "Name & email", "Job title alone", "Photographs", "Anonymised survey data"] },
      { id: "q5", type: "yesno", q: "Subject access requests must be acknowledged within one calendar month." },
      { id: "q6", type: "text", q: "Briefly describe one practice you have adopted to handle personal data more securely.", placeholder: "1-2 sentences..." },
    ],
  },
  a09: {
    title: "Display Screen Equipment Self-Assessment",
    questions: [
      { id: "q1", type: "yesno", q: "My chair is height-adjustable and provides adequate lower-back support." },
      { id: "q2", type: "yesno", q: "The top of my screen is at or just below eye level." },
      { id: "q3", type: "yesno", q: "My keyboard and mouse are positioned to keep my wrists straight." },
      { id: "q4", type: "yesno", q: "Lighting in my workspace is sufficient and free from glare." },
      { id: "q5", type: "yesno", q: "I take regular breaks away from the screen." },
      { id: "q6", type: "single", q: "How would you rate your overall workstation comfort?", options: ["Excellent", "Good", "Acceptable", "Needs adjustment"] },
      { id: "q7", type: "multi", q: "Which equipment do you currently use? (select all that apply)", options: ["External monitor", "Laptop stand", "Wrist rest", "Footrest", "Headset", "None of the above"] },
      { id: "q8", type: "text", q: "Any additional notes for your manager or facilities?", placeholder: "Optional..." },
    ],
  },
};

// User profile seed
const SEED_PROFILE = {
  firstName: "Alex",
  lastName: "Morgan",
  email: "alex.morgan@witness.example",
  phone: "+44 20 7946 0118",
  jobTitle: "Senior Case Coordinator",
  department: "Legal Operations",
  manager: "Priya Shah",
  team: "Casework — South",
  emergencyName: "Jamie Morgan",
  emergencyRelation: "Spouse",
  emergencyPhone: "+44 20 7946 0227",
  notifications: {
    newAssets: true,
    deadlineReminders: true,
    weeklyDigest: false,
    productUpdates: false,
  },
};

const SEED_NOTIFS = [
  { id: "n1", text: "New required item: Annual Health & Safety Declaration", when: "2 hours ago" },
  { id: "n2", text: "Reminder: Code of Conduct due 15 May", when: "Yesterday" },
  { id: "n3", text: "Q2 Town Hall recording is now available", when: "2 days ago" },
  { id: "n4", text: "Expense Claim template updated", when: "5 days ago" },
];

window.WITNESS_DATA = {
  CATEGORIES, ASSET_TYPES, SEED_ASSETS, SEED_READ,
  FORM_TEMPLATES, SEED_PROFILE, SEED_NOTIFS,
};
