// Base catalogue shape + curated product taxonomy. All operator/venue/booking
// data is loaded from the Bookable API at boot (see bookable-api.jsx). These
// arrays start empty and are populated by the live loader.

const PRODUCT_TYPES = [
  { id: 'afternoon-tea',    name: 'Afternoon Tea',       blurb: 'Sweet & savoury tiers',   accent: '#f3d9a6' },
  { id: 'bottomless-brunch',name: 'Bottomless Brunch',   blurb: 'Free-flow weekend brunch',accent: '#f8b9c4' },
  { id: 'lunch',            name: 'Lunch',               blurb: 'Sit-down midday service', accent: '#cbe4a2' },
  { id: 'dinner',           name: 'Dinner',              blurb: 'Evening dining',          accent: '#c8b8ee' },
  { id: 'entry',            name: 'Entry',               blurb: 'Door entry & queue jump', accent: '#a9c8f5' },
  { id: 'cocktail',         name: 'Cocktail Masterclass',blurb: 'Hands-on bar experience', accent: '#f6c7a3' },
  { id: 'bar-reservation',  name: 'Bar Reservation',     blurb: 'Reserved areas & drinks tables', accent: '#e6d4b0' },
  { id: 'karaoke',          name: 'Karaoke',             blurb: 'Private rooms & mic time', accent: '#ffb3d9' },
];

const OPERATORS = [];
const VENUES = [];
const SEED_BOOKINGS = [];
const CITIES = ['All locations'];

function productById(id) { return PRODUCT_TYPES.find(p => p.id === id); }
function operatorById(id) { return OPERATORS.find(o => o.id === id); }
function venueById(id) { return VENUES.find(v => v.id === id); }

// Availability comes from /api/availability — this stub keeps any legacy
// callers that haven't been migrated from crashing.
function slotsFor() { return []; }

Object.assign(window, {
  PRODUCT_TYPES, OPERATORS, VENUES, CITIES, SEED_BOOKINGS,
  slotsFor, productById, operatorById, venueById,
});
