// POS data — categories, items, open tickets

const POS_CATS = [
  {id:'drinks',   name:'Pijača',     icon:'box', color:'#00BCD4'},
  {id:'alcohol',  name:'Alkohol',    icon:'box', color:'#9C27B0'},
  {id:'food',     name:'Hrana',      icon:'box', color:'#FF9800'},
  {id:'minibar',  name:'Mini-bar',   icon:'box', color:'#E91E63'},
  {id:'wellness', name:'Wellness',   icon:'box', color:'#2DD164'},
  {id:'activity', name:'Aktivnosti', icon:'box', color:'#2196F3'},
  {id:'amenity',  name:'Hotel',      icon:'box', color:'#37474F'},
  {id:'shop',     name:'Trgovina',   icon:'box', color:'#FFB300'},
];

const POS_ITEMS = [
  // drinks
  {id:'i1',  cat:'drinks', name:'Espresso',         price:2.40, vat:'22%', stock:99},
  {id:'i2',  cat:'drinks', name:'Cappuccino',       price:3.20, vat:'22%', stock:99},
  {id:'i3',  cat:'drinks', name:'Čaj zeliščni',     price:2.80, vat:'22%', stock:99},
  {id:'i4',  cat:'drinks', name:'Voda 0.5l',        price:2.50, vat:'22%', stock:48},
  {id:'i5',  cat:'drinks', name:'Sok pomaranča',    price:3.80, vat:'22%', stock:24},
  {id:'i6',  cat:'drinks', name:'Coca-Cola 0.33l',  price:3.20, vat:'22%', stock:36},
  // alcohol
  {id:'i7',  cat:'alcohol', name:'Pivo Union 0.5l', price:4.50, vat:'22%', stock:60},
  {id:'i8',  cat:'alcohol', name:'Laško 0.33l',     price:3.80, vat:'22%', stock:42},
  {id:'i9',  cat:'alcohol', name:'Vino kozarec',    price:5.50, vat:'22%', stock:120},
  {id:'i10', cat:'alcohol', name:'Aperol Spritz',   price:7.50, vat:'22%', stock:99},
  {id:'i11', cat:'alcohol', name:'Šampanjec Moët',  price:85.00,vat:'22%', stock:8},
  {id:'i12', cat:'alcohol', name:'Whiskey Jameson', price:8.00, vat:'22%', stock:24},
  // food
  {id:'i13', cat:'food', name:'Klubski sendvič',     price:12.50, vat:'9.5%', stock:24},
  {id:'i14', cat:'food', name:'Cheeseburger',        price:16.00, vat:'9.5%', stock:24},
  {id:'i15', cat:'food', name:'Sezonska solata',     price:9.50,  vat:'9.5%', stock:24},
  {id:'i16', cat:'food', name:'Kremšnita',           price:5.50,  vat:'9.5%', stock:18},
  {id:'i17', cat:'food', name:'Goveja juha',         price:6.00,  vat:'9.5%', stock:30},
  {id:'i18', cat:'food', name:'Postrv Bled',         price:24.00, vat:'9.5%', stock:12},
  // minibar
  {id:'i19', cat:'minibar', name:'Pringles',         price:4.50, vat:'22%', stock:0},
  {id:'i20', cat:'minibar', name:'Toblerone',        price:5.50, vat:'9.5%', stock:0},
  {id:'i21', cat:'minibar', name:'Energijska pijača',price:4.00, vat:'22%', stock:0},
  // wellness
  {id:'i22', cat:'wellness', name:'Wellness 2h',      price:25.00, vat:'9.5%', stock:99},
  {id:'i23', cat:'wellness', name:'Sauna 1h',         price:15.00, vat:'9.5%', stock:99},
  {id:'i24', cat:'wellness', name:'Masaža klasična 50min',price:65.00,vat:'22%', stock:6},
  {id:'i25', cat:'wellness', name:'Lymph drenaža',    price:75.00, vat:'22%', stock:4},
  // activity
  {id:'i26', cat:'activity', name:'Pletna do otoka',  price:18.00, vat:'9.5%', stock:50},
  {id:'i27', cat:'activity', name:'Najem kolesa 1 dan',price:20.00,vat:'22%', stock:14},
  {id:'i28', cat:'activity', name:'Pohod Mali grad (vodeno)',price:35.00,vat:'22%', stock:12},
  {id:'i29', cat:'activity', name:'Smučarska karta',  price:48.00, vat:'22%', stock:99},
  // amenity
  {id:'i30', cat:'amenity', name:'Brisača plus',      price:8.00, vat:'22%', stock:50},
  {id:'i31', cat:'amenity', name:'Copati',            price:9.00, vat:'22%', stock:30},
  {id:'i32', cat:'amenity', name:'Halja',             price:45.00, vat:'22%', stock:14},
  {id:'i33', cat:'amenity', name:'Set kozmetike',     price:12.00, vat:'22%', stock:24},
  // shop
  {id:'i34', cat:'shop', name:'Magnetek Bled',        price:4.50, vat:'22%', stock:99},
  {id:'i35', cat:'shop', name:'Razglednica',          price:1.50, vat:'22%', stock:99},
  {id:'i36', cat:'shop', name:'Triglav majica',       price:24.00, vat:'22%', stock:18},
  {id:'i37', cat:'shop', name:'Med Slovenija',        price:15.00, vat:'22%', stock:24},
];

// Folio / open guest accounts
const FOLIOS = [
  {room:'305', guest:'James Schmidt', items:[
    {date:'28.04', desc:'Junior Suite × 1 noč',     qty:1, unit:230, total:230, type:'room'},
    {date:'28.04', desc:'Turistična taksa',         qty:2, unit:2.5, total:5,   type:'tax'},
    {date:'28.04', desc:'Cappuccino × 2',           qty:2, unit:3.2, total:6.4, type:'pos'},
    {date:'29.04', desc:'Junior Suite × 1 noč',     qty:1, unit:230, total:230, type:'room'},
    {date:'29.04', desc:'Wellness 2h × 2',          qty:2, unit:25,  total:50,  type:'pos'},
    {date:'29.04', desc:'Vino kozarec × 2',         qty:2, unit:5.5, total:11,  type:'pos'},
    {date:'30.04', desc:'Junior Suite × 1 noč',     qty:1, unit:230, total:230, type:'room'},
    {date:'30.04', desc:'Postrv Bled × 1',          qty:1, unit:24,  total:24,  type:'pos'},
    {date:'30.04', desc:'Masaža klasična',          qty:1, unit:65,  total:65,  type:'pos'},
  ], paid:1380, deposit:200},
  {room:'213', guest:'Ana Novak', items:[
    {date:'28.04', desc:'Deluxe × 1 noč',           qty:1, unit:160, total:160, type:'room'},
    {date:'28.04', desc:'Turistična taksa',         qty:2, unit:2.5, total:5,   type:'tax'},
    {date:'28.04', desc:'Pivo Union × 2',           qty:2, unit:4.5, total:9,   type:'pos'},
  ], paid:0, deposit:0},
];

// Wellness rezervacije
const WELLNESS = [
  {time:'10:00', service:'Masaža klasična 50min', guest:'James Schmidt', room:'305', status:'confirmed', therapist:'Petra'},
  {time:'11:00', service:'Lymph drenaža',         guest:'Sara Lah',      room:'412', status:'confirmed', therapist:'Tanja'},
  {time:'14:00', service:'Wellness 2h',           guest:'Petra Müller',  room:'201', status:'confirmed', therapist:'—'},
  {time:'15:00', service:'Sauna 1h',              guest:'Marko Hribar',  room:'108', status:'open',      therapist:'—'},
  {time:'16:30', service:'Masaža klasična 50min', guest:'Walk-in',       room:'—',   status:'open',      therapist:'Petra'},
  {time:'17:00', service:'Wellness 2h',           guest:'James Schmidt', room:'305', status:'confirmed', therapist:'—'},
];

// Računi smene
const RECEIPTS = [
  {no:'2026-04201', time:'13:38', guest:'James Schmidt',  room:'305', total:71.40, vat:'9.5%/22%', method:'room', eor:'a8d3f4...c1', status:'ok'},
  {no:'2026-04200', time:'13:22', guest:'Walk-in',        room:'—',   total:18.00, vat:'9.5%',     method:'cash', eor:'b1d5e9...44', status:'ok'},
  {no:'2026-04199', time:'13:05', guest:'Marko Hribar',   room:'108', total:9.00,  vat:'22%',      method:'card', eor:'c9a2b1...87', status:'ok'},
  {no:'2026-04198', time:'12:48', guest:'Sara Lah',       room:'412', total:85.00, vat:'22%',      method:'room', eor:'d4f3e2...18', status:'ok'},
  {no:'2026-04197', time:'12:32', guest:'Walk-in',        room:'—',   total:6.40,  vat:'22%',      method:'cash', eor:'e2a1c5...92', status:'ok'},
  {no:'2026-04196', time:'12:15', guest:'Hans Schneider', room:'418', total:24.00, vat:'9.5%',     method:'room', eor:'f5b8d4...23', status:'storno'},
  {no:'2026-04195', time:'11:54', guest:'Walk-in',        room:'—',   total:42.50, vat:'9.5%/22%', method:'card', eor:'a1c7f8...64', status:'ok'},
];

// Group bookings
const GROUPS = [
  {id:'GRP-2026-031', name:'Mladinski svet Slovenije · konferenca', leader:'Petra Krajnc', rooms:18, pax:34, checkin:'12.05.', checkout:'14.05.', status:'confirmed', total:6840, paid:3420, contact:'p.krajnc@msd.si'},
  {id:'GRP-2026-032', name:'Lufthansa · pilots stay-over',          leader:'C. Schmidt',   rooms:8,  pax:8,  checkin:'30.04.', checkout:'01.05.', status:'option',    total:960,  paid:0,    contact:'crew@lufthansa.de'},
  {id:'GRP-2026-033', name:'Toyota DACH · poslovni team',           leader:'Frank Weber',  rooms:12, pax:20, checkin:'05.05.', checkout:'08.05.', status:'confirmed', total:5760, paid:5760, contact:'fweber@toyota.de'},
  {id:'GRP-2026-034', name:'OŠ Bled · zaključna ekskurzija',        leader:'Mateja Pust',  rooms:15, pax:42, checkin:'20.05.', checkout:'21.05.', status:'inquiry',   total:1800, paid:0,    contact:'mateja@osbled.si'},
];

// Messages
const MESSAGES = [
  {id:'m1', room:'305', guest:'James Schmidt', from:'guest', text:'Hi! Could we get extra towels please?',          time:'13:42', read:false},
  {id:'m2', room:'305', guest:'James Schmidt', from:'staff', text:'Of course, on the way in 10 minutes.',           time:'13:43', read:true,  by:'Maja K.'},
  {id:'m3', room:'412', guest:'Sara Lah',      from:'guest', text:'Naj prinesete šampanjec v sobo, prosim?',        time:'13:24', read:true},
  {id:'m4', room:'412', guest:'Sara Lah',      from:'staff', text:'Seveda, Moët Brut bo pri vas v 15 min.',         time:'13:26', read:true,  by:'Maja K.'},
  {id:'m5', room:'418', guest:'Hans Schneider',from:'guest', text:'Der Fernseher funktioniert nicht.',              time:'13:17', read:false},
  {id:'m6', room:'213', guest:'Ana Novak',     from:'guest', text:'Lahko podaljšamo check-out do 14h?',             time:'12:48', read:true},
  {id:'m7', room:'213', guest:'Ana Novak',     from:'staff', text:'Da, smo dodali pozni check-out v rezervacijo.',  time:'12:51', read:true,  by:'Maja K.'},
  {id:'m8', room:'108', guest:'Marko Hribar',  from:'guest', text:'Bi naročili taksi za jutri 6:30?',               time:'11:05', read:true},
  {id:'m9', room:'108', guest:'Marko Hribar',  from:'staff', text:'Taksi je rezerviran. Voznik vas pokliče v sobo.',time:'11:08', read:true,  by:'Janez L.'},
];

// Parking
const PARKING_SPOTS = [
  {n:'P-01', floor:'-1', type:'standard', occupied:true,  guest:'James Schmidt', room:'305', plate:'D-MK 4821', from:'28.04. 14:12'},
  {n:'P-02', floor:'-1', type:'standard', occupied:true,  guest:'Marko Hribar',  room:'108', plate:'KR-LM-281', from:'28.04. 11:32'},
  {n:'P-03', floor:'-1', type:'standard', occupied:false, guest:null, room:null, plate:null, from:null},
  {n:'P-04', floor:'-1', type:'standard', occupied:true,  guest:'Marco Rossi',   room:'117', plate:'IT MI234TR',from:'28.04. 13:48'},
  {n:'P-05', floor:'-1', type:'standard', occupied:false, guest:null, room:null, plate:null, from:null},
  {n:'P-06', floor:'-1', type:'standard', occupied:true,  guest:'Sara Lah',      room:'412', plate:'LJ KU-832', from:'28.04. 12:20'},
  {n:'P-EV1',floor:'-1', type:'ev',       occupied:true,  guest:'Hans Schneider',room:'418', plate:'D-AB 8821', from:'28.04. 09:14'},
  {n:'P-EV2',floor:'-1', type:'ev',       occupied:false, guest:null, room:null, plate:null, from:null},
  {n:'P-H1', floor:'-1', type:'handicap', occupied:false, guest:null, room:null, plate:null, from:null},
  {n:'P-B1', floor:'-1', type:'bus',      occupied:false, guest:null, room:null, plate:null, from:null},
];

// Cash register denominations
const CASH_DENOMS = [
  {v:500, count:0},  {v:200, count:0}, {v:100, count:4},
  {v:50,  count:8},  {v:20,  count:14},{v:10,  count:18},
  {v:5,   count:22}, {v:2,   count:34},{v:1,   count:48},
  {v:0.50,count:32}, {v:0.20,count:24},{v:0.10,count:18},
  {v:0.05,count:14}, {v:0.02,count:8}, {v:0.01,count:6},
];

Object.assign(window, { POS_CATS, POS_ITEMS, FOLIOS, WELLNESS, RECEIPTS, GROUPS, MESSAGES, PARKING_SPOTS, CASH_DENOMS });
