// Mock data for the prototype
const MOCK_DATA = {
  buildings: [
    { id: "hq", label_en: "Verena HQ, Bangkok", label_th: "สำนักงานใหญ่ กรุงเทพฯ" },
    { id: "b1", label_en: "Building 1, Lat Krabang", label_th: "อาคาร 1 ลาดกระบัง" },
    { id: "b2", label_en: "Building 2, Lat Krabang", label_th: "อาคาร 2 ลาดกระบัง" },
    { id: "gh", label_en: "Guest House", label_th: "บ้านรับรอง" },
    { id: "wh", label_en: "Warehouse, Bang Phli", label_th: "คลังสินค้า บางพลี" },
  ],

  utility_types: [
    { id: "elec",  label_en: "Electricity", label_th: "ไฟฟ้า",        unit_en: "kWh",  unit_th: "หน่วย", rate: 4.42, color: "#EA580C" },
    { id: "water", label_en: "Water",       label_th: "น้ำประปา",     unit_en: "m³",   unit_th: "ลบ.ม.", rate: 18.50, color: "#0EA5E9" },
    { id: "net",   label_en: "Internet",    label_th: "อินเตอร์เน็ต", unit_en: "Mbps", unit_th: "Mbps",  rate: 1290.00, color: "#10B981" },
    { id: "phone", label_en: "Phone",       label_th: "โทรศัพท์",     unit_en: "min",  unit_th: "นาที",  rate: 0.85, color: "#A855F7" },
  ],

  meters: [
    { id: "ME-001", label_en: "Electricity Meter, Building 1",  label_th: "มิเตอร์ไฟฟ้า อาคาร 1",   type: "elec",  building: "b1", last: 48210 },
    { id: "ME-002", label_en: "Electricity Meter, Building 2",  label_th: "มิเตอร์ไฟฟ้า อาคาร 2",   type: "elec",  building: "b2", last: 39477 },
    { id: "ME-003", label_en: "Electricity Meter, HQ Floor 8",  label_th: "มิเตอร์ไฟฟ้า สนญ. ชั้น 8",type: "elec",  building: "hq", last: 12104 },
    { id: "MW-001", label_en: "Water Meter, Guest House",       label_th: "มิเตอร์น้ำ บ้านรับรอง",   type: "water", building: "gh", last: 2841 },
    { id: "MW-002", label_en: "Water Meter, Building 1",        label_th: "มิเตอร์น้ำ อาคาร 1",     type: "water", building: "b1", last: 5210 },
    { id: "MW-003", label_en: "Water Meter, Warehouse",         label_th: "มิเตอร์น้ำ คลังสินค้า",   type: "water", building: "wh", last: 1894 },
    { id: "MN-001", label_en: "Fibre Link, HQ",                 label_th: "อินเตอร์เน็ตไฟเบอร์ สนญ.",type: "net",   building: "hq", last: 1000 },
    { id: "MP-001", label_en: "PBX Trunk, HQ",                  label_th: "สายโทรศัพท์ สนญ.",       type: "phone", building: "hq", last: 0 },
  ],

  // 12 months of consumption (Jun 2025 → May 2026) per utility type
  monthly: {
    months: ["Jun","Jul","Aug","Sep","Oct","Nov","Dec","Jan","Feb","Mar","Apr","May"],
    months_th: ["มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค.","ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค."],
    elec:  [42100, 44200, 46800, 45900, 47200, 44300, 41200, 39800, 42100, 45400, 48700, 51200],
    water: [ 1820,  1910,  1980,  2010,  1950,  1880,  1740,  1690,  1810,  1920,  2050,  2180],
    net:   [ 1000,  1000,  1000,  1000,  1000,  1000,  1000,  1000,  1000,  1000,  1000,  1000],
    phone: [ 3120,  2980,  3450,  3210,  3380,  3590,  2870,  2410,  2780,  3020,  3150,  3280],
  },

  recent: [
    { date: "2026-05-14", meter: "ME-001", type: "elec",  reading: 48210, usage: 2840, by: "Somchai P.",   status: "approved" },
    { date: "2026-05-14", meter: "MW-001", type: "water", reading:  2841, usage:  124, by: "Naree W.",     status: "approved" },
    { date: "2026-05-13", meter: "ME-002", type: "elec",  reading: 39477, usage: 2210, by: "Anan K.",      status: "pending"  },
    { date: "2026-05-12", meter: "ME-003", type: "elec",  reading: 12104, usage:  640, by: "Pim S.",       status: "approved" },
    { date: "2026-05-12", meter: "MW-002", type: "water", reading:  5210, usage:  198, by: "Naree W.",     status: "review"   },
    { date: "2026-05-11", meter: "MN-001", type: "net",   reading:  1000, usage: 1000, by: "IT Bot",       status: "approved" },
    { date: "2026-05-10", meter: "MW-003", type: "water", reading:  1894, usage:   86, by: "Pakorn T.",    status: "approved" },
    { date: "2026-05-09", meter: "MP-001", type: "phone", reading:  3280, usage: 3280, by: "PBX Sync",     status: "approved" },
  ],

  users: [
    { name: "Nathanon T.",  email: "nathanon.t@gmail.com",        role: "admin",  team: "Facilities",  last: "5 min ago" },
    { name: "Somchai P.",   email: "somchai.p@verena.co.th",      role: "user",   team: "Building 1",  last: "1 hr ago"  },
    { name: "Naree W.",     email: "naree.w@verena.co.th",        role: "user",   team: "Facilities",  last: "2 hr ago"  },
    { name: "Anan K.",      email: "anan.k@verena.co.th",         role: "user",   team: "Building 2",  last: "Yesterday" },
    { name: "Pim S.",       email: "pim.s@verena.co.th",          role: "user",   team: "HQ",          last: "Yesterday" },
    { name: "Pakorn T.",    email: "pakorn.t@verena.co.th",       role: "user",   team: "Warehouse",   last: "3 days ago"},
    { name: "Wanchai L.",   email: "wanchai.l@verena.co.th",      role: "viewer", team: "Finance",     last: "1 week ago"},
    { name: "Kanya R.",     email: "kanya.r@verena.co.th",        role: "admin",  team: "IT",          last: "Just now"  },
  ],

  anomalies: [
    { meter: "ME-002", date: "2026-05-13", note_en: "Usage 38% above 12-month average",  note_th: "การใช้สูงกว่าค่าเฉลี่ย 12 เดือนถึง 38%" },
    { meter: "MW-002", date: "2026-05-12", note_en: "Reading lower than previous month", note_th: "ค่าที่อ่านได้ต่ำกว่าเดือนที่แล้ว" },
  ],
};

window.MOCK_DATA = MOCK_DATA;
