// clickinPMS — Superadmin mock data (realistic Slovenian hotel context)

const ORGS = [
  { id:'org-triglav', name:'Hotel Triglav Bled', city:'Bled', rooms:78, plan:'Pro', mrr:489, status:'active', signup:'2023-03-14', owner:'Marko Kranjc', occupancy:82, properties:3, lastActive:'pred 2 min' },
  { id:'org-adria',   name:'Adria Hotels Group', city:'Portorož',  rooms:312, plan:'Enterprise', mrr:1890, status:'active', signup:'2022-08-02', owner:'Nina Jurkovič', occupancy:76, properties:5, lastActive:'pred 1 min' },
  { id:'org-soca',    name:'Soča Resort Kobarid', city:'Kobarid',  rooms:44, plan:'Pro', mrr:389, status:'active', signup:'2024-01-19', owner:'Tomaž Pintar',   occupancy:64, properties:1, lastActive:'pred 18 min' },
  { id:'org-maribor', name:'Villa Maribor',       city:'Maribor',  rooms:22, plan:'Starter', mrr:149, status:'active', signup:'2024-06-03', owner:'Eva Horvat',     occupancy:71, properties:1, lastActive:'pred 4 ur' },
  { id:'org-kras',    name:'Kras Boutique',       city:'Sežana',   rooms:18, plan:'Starter', mrr:149, status:'trial',  signup:'2025-03-22', owner:'Luka Bizjak',    occupancy:52, properties:1, lastActive:'pred 1 dan' },
  { id:'org-ljubljana',name:'Grand Union Ljubljana', city:'Ljubljana', rooms:198, plan:'Enterprise', mrr:1890, status:'active', signup:'2021-11-28', owner:'Petra Zupan', occupancy:89, properties:2, lastActive:'pred 30 s' },
  { id:'org-koper',   name:'Koper Port Suites',  city:'Koper',    rooms:36, plan:'Pro', mrr:389, status:'active', signup:'2023-09-11', owner:'Jure Fabjan',    occupancy:68, properties:2, lastActive:'pred 5 min' },
  { id:'org-pohorje', name:'Pohorje Ski Lodge',  city:'Hoče-Slivnica', rooms:56, plan:'Pro', mrr:489, status:'active', signup:'2023-12-05', owner:'Ana Novak',      occupancy:94, properties:1, lastActive:'pred 12 min' },
  { id:'org-piran',   name:'Piran Seaside Inn',  city:'Piran',    rooms:14, plan:'Starter', mrr:149, status:'past_due', signup:'2024-04-17', owner:'Maja Vidmar', occupancy:38, properties:1, lastActive:'pred 3 dni' },
  { id:'org-celje',   name:'Celje Business Hotel', city:'Celje',  rooms:92, plan:'Pro', mrr:489, status:'active', signup:'2022-05-09', owner:'Rok Černe',      occupancy:73, properties:1, lastActive:'pred 42 min' },
  { id:'org-kranj',   name:'Kranj Old Town Rooms', city:'Kranj',  rooms:11, plan:'Starter', mrr:149, status:'suspended', signup:'2024-02-14', owner:'Sara Golob', occupancy:0,  properties:1, lastActive:'pred 9 dni' },
  { id:'org-rogaska', name:'Rogaška Spa Resort',  city:'Rogaška Slatina', rooms:124, plan:'Enterprise', mrr:1890, status:'active', signup:'2021-07-22', owner:'David Kos', occupancy:81, properties:3, lastActive:'pred 1 min' },
];

const USERS = [
  { id:'u-001', name:'Marko Kranjc',   email:'marko@hoteltriglav.si',    role:'Hotel Admin',    org:'Hotel Triglav Bled',     status:'active',    last:'pred 2 min',   twofa:true },
  { id:'u-002', name:'Nina Jurkovič',  email:'nina@adria-hotels.si',     role:'Hotel Admin',    org:'Adria Hotels Group',     status:'active',    last:'pred 1 min',   twofa:true },
  { id:'u-003', name:'Tina Novak',     email:'tina.n@adria-hotels.si',   role:'Front Desk Mgr', org:'Adria Hotels Group',     status:'active',    last:'pred 14 min',  twofa:true },
  { id:'u-004', name:'Maja Kranjc',    email:'maja@hoteltriglav.si',     role:'Receptionist',   org:'Hotel Triglav Bled',     status:'active',    last:'pred 3 min',   twofa:false },
  { id:'u-005', name:'Jure Fabjan',    email:'jure@koper-port.si',       role:'Hotel Admin',    org:'Koper Port Suites',      status:'active',    last:'pred 5 min',   twofa:true },
  { id:'u-006', name:'Petra Zupan',    email:'petra@grandunion.si',      role:'Hotel Admin',    org:'Grand Union Ljubljana',  status:'active',    last:'pred 30 s',    twofa:true },
  { id:'u-007', name:'Janez Logar',    email:'janez.l@grandunion.si',    role:'Receptionist',   org:'Grand Union Ljubljana',  status:'active',    last:'pred 12 min',  twofa:false },
  { id:'u-008', name:'Anita Koren',    email:'anita@grandunion.si',      role:'Housekeeping',   org:'Grand Union Ljubljana',  status:'active',    last:'pred 48 min',  twofa:false },
  { id:'u-009', name:'Rok Černe',      email:'rok@celje-bh.si',          role:'Hotel Admin',    org:'Celje Business Hotel',   status:'active',    last:'pred 42 min',  twofa:true },
  { id:'u-010', name:'Luka Bizjak',    email:'luka@kras-boutique.si',    role:'Hotel Admin',    org:'Kras Boutique',          status:'invited',   last:'—',            twofa:false },
  { id:'u-011', name:'Sara Golob',     email:'sara@kranj-rooms.si',      role:'Hotel Admin',    org:'Kranj Old Town Rooms',   status:'suspended', last:'pred 9 dni',   twofa:false },
  { id:'u-012', name:'Ana Novak',      email:'ana@pohorje-lodge.si',     role:'Hotel Admin',    org:'Pohorje Ski Lodge',      status:'active',    last:'pred 12 min',  twofa:true },
  { id:'u-013', name:'Andrej Šuštar',  email:'andrej@clickinpms.com',    role:'Superadmin',     org:'clickinPMS',             status:'active',    last:'sedaj',        twofa:true },
  { id:'u-014', name:'Katja Perko',    email:'katja@clickinpms.com',     role:'Support Agent',  org:'clickinPMS',             status:'active',    last:'pred 4 min',   twofa:true },
];

const TICKETS = [
  { id:'T-2847', subject:'Channel manager ne sinhronizira Booking.com', org:'Adria Hotels Group',     priority:'high',   status:'open',        opened:'pred 42 min', agent:'Katja Perko', messages:4 },
  { id:'T-2846', subject:'Napaka pri izdaji računa SI-fisk',             org:'Grand Union Ljubljana',  priority:'urgent', status:'in_progress', opened:'pred 1 ur',   agent:'Katja Perko', messages:7 },
  { id:'T-2845', subject:'Kako dodam novega recepcijskega uporabnika?',  org:'Kras Boutique',          priority:'low',    status:'open',        opened:'pred 2 ur',   agent:null,          messages:1 },
  { id:'T-2844', subject:'Samopostrežni kiosk ne tiska ključev',         org:'Hotel Triglav Bled',     priority:'high',   status:'waiting',     opened:'pred 4 ur',   agent:'Andrej Šuštar', messages:3 },
  { id:'T-2843', subject:'Uvoz rezervacij iz Expedia CSV',                org:'Pohorje Ski Lodge',      priority:'med',    status:'open',        opened:'pred 6 ur',   agent:null,          messages:2 },
  { id:'T-2842', subject:'Prosim za demo podatke za izobraževanje',      org:'Soča Resort Kobarid',    priority:'low',    status:'resolved',    opened:'včeraj',      agent:'Katja Perko', messages:5 },
  { id:'T-2841', subject:'Ne morem se prijaviti — 2FA ne deluje',       org:'Celje Business Hotel',   priority:'urgent', status:'resolved',    opened:'včeraj',      agent:'Andrej Šuštar', messages:8 },
  { id:'T-2840', subject:'Dodajte podporo za Revolut plačila',          org:'Villa Maribor',          priority:'med',    status:'open',        opened:'pred 2 dni',  agent:null,          messages:1 },
];

const AUDIT = [
  { ts:'13:42:18', actor:'Andrej Šuštar', action:'logged_in',          target:'Superadmin console',       ip:'178.172.43.9',  level:'info' },
  { ts:'13:38:02', actor:'Andrej Šuštar', action:'impersonated',       target:'Marko Kranjc (Hotel Triglav Bled)', ip:'178.172.43.9',  level:'warn' },
  { ts:'13:21:44', actor:'system',        action:'subscription_failed', target:'Piran Seaside Inn (invoice #INV-4082)', ip:'—',  level:'error' },
  { ts:'13:05:11', actor:'Nina Jurkovič', action:'exported_guest_data', target:'Adria Hotels Group',       ip:'89.142.201.5',  level:'warn' },
  { ts:'12:58:33', actor:'Katja Perko',   action:'resolved_ticket',    target:'T-2841',                    ip:'94.103.88.12',  level:'info' },
  { ts:'12:41:09', actor:'system',        action:'backup_completed',   target:'all tenants (EU-Fra-1)',    ip:'—',             level:'info' },
  { ts:'12:19:55', actor:'Andrej Šuštar', action:'suspended_org',      target:'Kranj Old Town Rooms',      ip:'178.172.43.9',  level:'warn' },
  { ts:'11:47:22', actor:'system',        action:'integration_error',  target:'Booking.com API (rate-limit)', ip:'—',          level:'error' },
  { ts:'11:30:01', actor:'Petra Zupan',   action:'changed_pricing',    target:'Grand Union Ljubljana · Deluxe rooms', ip:'193.2.4.88', level:'info' },
  { ts:'10:52:40', actor:'system',        action:'new_signup',         target:'Kras Boutique (14-day trial)', ip:'—',          level:'info' },
];

const INTEGRATIONS = [
  { name:'Booking.com',     status:'degraded', latency:812, uptime:99.2, lastSync:'pred 3 min', icon:'BK' },
  { name:'Expedia / Hotels.com', status:'ok',      latency:142, uptime:99.9, lastSync:'pred 1 min', icon:'EX' },
  { name:'Airbnb',          status:'ok',      latency:203, uptime:99.8, lastSync:'pred 2 min', icon:'AB' },
  { name:'FURS (eSLOG + davčna blagajna)', status:'ok', latency:88, uptime:100, lastSync:'pred 30 s', icon:'FU' },
  { name:'AJPES (poročanje gostov)', status:'ok', latency:216, uptime:99.7, lastSync:'pred 5 min', icon:'AJ' },
  { name:'Stripe plačila',  status:'ok',      latency:94, uptime:99.99, lastSync:'pred 12 s', icon:'S' },
  { name:'Revolut Business', status:'ok',     latency:121, uptime:99.9, lastSync:'pred 45 s', icon:'R' },
  { name:'Mailgun (e-mail)', status:'ok',     latency:67, uptime:99.9, lastSync:'pred 1 min', icon:'M' },
  { name:'Google Hotel Ads', status:'down',   latency:0,   uptime:97.1, lastSync:'pred 2 ur',  icon:'GH' },
];

const INVOICES = [
  { id:'INV-4091', org:'Adria Hotels Group',    amount:1890, status:'paid',     due:'01.04.2025', paid:'01.04.2025' },
  { id:'INV-4090', org:'Grand Union Ljubljana', amount:1890, status:'paid',     due:'01.04.2025', paid:'02.04.2025' },
  { id:'INV-4089', org:'Rogaška Spa Resort',    amount:1890, status:'paid',     due:'01.04.2025', paid:'31.03.2025' },
  { id:'INV-4088', org:'Hotel Triglav Bled',    amount:489,  status:'paid',     due:'01.04.2025', paid:'01.04.2025' },
  { id:'INV-4087', org:'Celje Business Hotel',  amount:489,  status:'paid',     due:'01.04.2025', paid:'04.04.2025' },
  { id:'INV-4086', org:'Pohorje Ski Lodge',     amount:489,  status:'paid',     due:'01.04.2025', paid:'02.04.2025' },
  { id:'INV-4085', org:'Koper Port Suites',     amount:389,  status:'paid',     due:'01.04.2025', paid:'03.04.2025' },
  { id:'INV-4084', org:'Soča Resort Kobarid',   amount:389,  status:'paid',     due:'01.04.2025', paid:'01.04.2025' },
  { id:'INV-4083', org:'Villa Maribor',         amount:149,  status:'paid',     due:'01.04.2025', paid:'01.04.2025' },
  { id:'INV-4082', org:'Piran Seaside Inn',     amount:149,  status:'past_due', due:'01.04.2025', paid:null },
  { id:'INV-4081', org:'Kras Boutique',         amount:0,    status:'trial',    due:'—',          paid:null },
  { id:'INV-4080', org:'Kranj Old Town Rooms',  amount:149,  status:'void',     due:'01.04.2025', paid:null },
];

// MRR trend (last 12 months, €)
const MRR_TREND = [4120, 4390, 4510, 4720, 4890, 5110, 5340, 5670, 5890, 6210, 6580, 6950];
const MRR_MONTHS = ['Maj','Jun','Jul','Avg','Sep','Okt','Nov','Dec','Jan','Feb','Mar','Apr'];

// Sparkline for signups per week (last 12w)
const SIGNUPS_TREND = [1, 2, 1, 3, 2, 4, 3, 5, 3, 4, 6, 5];

// Announcements / platform notices
const ANNOUNCEMENTS = [
  { id:1, title:'Nova različica 4.2 — izboljšan channel manager', body:'Izdana v ponedeljek. Vključuje hitrejšo sinhronizacijo in podporo za Airbnb instant book.', date:'10.04.2025', audience:'Vsi uporabniki' },
  { id:2, title:'Načrtovano vzdrževanje — 18.04. ob 02:00',      body:'Predviden čas nedostopnosti: 20 min. Zadeva: posodobitev baze (EU-Fra-1).', date:'09.04.2025', audience:'Vsi uporabniki' },
];

Object.assign(window, {
  ORGS, USERS, TICKETS, AUDIT, INTEGRATIONS, INVOICES,
  MRR_TREND, MRR_MONTHS, SIGNUPS_TREND, ANNOUNCEMENTS
});
