// Menu + reservation data (structure only; localized strings live in i18n.jsx)
const MENU_CATEGORIES = [
  { id: 'mezze' },
  { id: 'wraps' },
  { id: 'grill' },
  { id: 'sides' },
  { id: 'boxes' },
];

const MENU_ITEMS = [
  { id: 'moutabal',     cat: 'mezze',  price: 8.5,  img: 'assets/dish-wrap-falafel.webp', tags: ['vegan', 'signature'] },
  { id: 'tabbouleh',    cat: 'mezze',  price: 7.5,  img: 'assets/dish-tabbouleh.webp',    tags: ['vegan'] },
  { id: 'falafel-box',  cat: 'mezze',  price: 12.0, img: 'assets/dish-falafel-box.webp',  tags: ['vegan', 'popular'] },
  { id: 'kebbeh',       cat: 'mezze',  price: 9.0,  img: 'assets/dish-kebbeh.webp',       tags: [] },
  { id: 'wrap-falafel', cat: 'wraps',  price: 11.0, img: 'assets/dish-moutabal.webp',     tags: ['vegan', 'popular'] },
  { id: 'wrap-chicken', cat: 'wraps',  price: 11.5, img: 'assets/dish-chicken-wrap.webp', tags: [] },
  { id: 'shish-taouk',  cat: 'grill',  price: 16.0, img: 'assets/dish-shish-taouk.webp',  tags: ['signature'] },
  { id: 'wings',        cat: 'grill',  price: 13.5, img: 'assets/dish-chicken-wings.webp',tags: [] },
  { id: 'tenders',      cat: 'grill',  price: 12.0, img: 'assets/dish-chicken-tenders.webp', tags: [] },
  { id: 'fattoush',     cat: 'sides',  price: 8.0,  img: null, tags: ['vegan'] },
  { id: 'hummus',       cat: 'sides',  price: 7.0,  img: null, tags: ['vegan'] },
  { id: 'fries',        cat: 'sides',  price: 5.5,  img: null, tags: ['vegan'] },
  { id: 'box-family',   cat: 'boxes',  price: 58.0, img: null, tags: ['popular'] },
  { id: 'box-mezze',    cat: 'boxes',  price: 34.0, img: null, tags: [] },
];

function buildAvailability() {
  const out = {};
  const today = new Date();
  for (let d = 0; d < 21; d++) {
    const date = new Date(today);
    date.setDate(today.getDate() + d);
    const key = lnLocalISODate(date);
    const slots = [];
    const times = ['12:00','12:30','13:00','13:30','14:00','19:00','19:30','20:00','20:30','21:00','21:30','22:00'];
    times.forEach((t, i) => {
      const seed = (d * 13 + i * 7) % 11;
      const available = seed !== 0 && seed !== 3 && !(d === 0 && i < 5);
      slots.push({ time: t, available });
    });
    if (date.getDay() === 1) slots.forEach(s => s.available = false); // Mondays closed
    out[key] = slots;
  }
  return out;
}

const AVAILABILITY = buildAvailability();

const RESTAURANT_INFO = {
  name: 'Los Nobles Tacos',
  address: '27 rue des Oliviers, Paris 11e',
  phone: '+33 1 43 55 21 08',
  uberEatsUrl: 'https://www.ubereats.com/',
};

Object.assign(window, { MENU_CATEGORIES, MENU_ITEMS, AVAILABILITY, RESTAURANT_INFO });
