/* Delishpot brand tokens + menu data */

const PALETTE = {
  cream: '#f1e6cf',
  creamLight: '#f7eedb',
  creamDark: '#e8d6ad',
  paper: '#fbf5e6',
  teal: '#0e6e6a',
  tealDeep: '#073c3a',
  tealInk: '#052725',
  orange: '#e87a1f',
  orangeDeep: '#c45f10',
  ink: '#1a1410',
  mute: '#6b6253',
  line: '#d8c9a8',
};

/* Reusable image metadata: semantic filenames, accessibility copy, and discovery tags. */
const FOOD_IMAGES = {
  bulkSoupTub: {
    src: 'uploads/delishpot-bulk-soup-branded-tub.jpg',
    alt: 'Delishpot bulk soup packed in a branded tub with meat and vegetables.',
    tags: ['bulk', 'soup', 'packaging', 'catering'],
  },
  vegetableSoupTub: {
    src: 'uploads/delishpot-vegetable-soup-branded-tub.jpg',
    alt: 'Vegetable soup with assorted meat packed in a Delishpot branded tub.',
    tags: ['bulk', 'vegetable-soup', 'packaging', 'nigerian-food'],
  },
  okraSwallow: {
    src: 'uploads/delishpot-okra-fish-swallow.jpg',
    alt: 'Okra soup with fish and seafood served beside a smooth swallow.',
    tags: ['okra', 'soup', 'fish', 'swallow'],
  },
  boiledYam: {
    src: 'uploads/delishpot-boiled-yam-platter.jpg',
    alt: 'Boiled yam slices stacked on a plate with fresh herb garnish.',
    tags: ['yam', 'main-course', 'plated'],
  },
  pepperedFish: {
    src: 'uploads/delishpot-peppered-fish-closeup.jpg',
    alt: 'Peppered fish pieces finished with sliced onion and fresh peppers.',
    tags: ['fish', 'peppered', 'sauce', 'protein'],
  },
  pepperedFishPlate: {
    src: 'uploads/delishpot-peppered-fish-plate.jpg',
    alt: 'A plate of peppered fish served in a rich red sauce.',
    tags: ['fish', 'peppered', 'side'],
  },
  yamFishOverhead: {
    src: 'uploads/delishpot-yam-fish-sauce-overhead.jpg',
    alt: 'Overhead view of boiled yam served with a plate of fish sauce.',
    tags: ['yam', 'fish-sauce', 'main-course'],
  },
  yamFishPlate: {
    src: 'uploads/delishpot-yam-fish-sauce-plated.jpg',
    alt: 'Boiled yam and fish sauce arranged together for a Nigerian meal.',
    tags: ['yam', 'fish-sauce', 'plated'],
  },
  eggSauce: {
    src: 'uploads/delishpot-egg-sauce-bowl.jpg',
    alt: 'Egg sauce in a shallow bowl with pepper and tomato oil.',
    tags: ['egg-sauce', 'sauce', 'side'],
  },
  specialFriedRice: {
    src: 'uploads/delishpot-special-fried-rice-platter.jpg',
    alt: 'Special fried rice molded on a platter with sides around the table.',
    tags: ['fried-rice', 'rice', 'signature'],
  },
  friedRiceChicken: {
    src: 'uploads/delishpot-special-fried-rice-chicken-plate.jpg',
    alt: 'Special fried rice served with fried chicken on a white plate.',
    tags: ['fried-rice', 'chicken', 'main-course'],
  },
  friedRiceChickenDetail: {
    src: 'uploads/delishpot-special-fried-rice-chicken.jpg',
    alt: 'Close view of special fried rice and a crisp chicken portion.',
    tags: ['fried-rice', 'chicken', 'detail'],
  },
  chickenSandwich: {
    src: 'uploads/delishpot-chicken-sandwich.jpg',
    alt: 'Toasted chicken sandwich triangles plated with tomato and lettuce.',
    tags: ['sandwich', 'chicken', 'lunch'],
  },
  jollofSpaghetti: {
    src: 'uploads/delishpot-jollof-spaghetti.jpg',
    alt: 'Jollof spaghetti tossed in pepper sauce on a Delishpot plate.',
    tags: ['spaghetti', 'jollof', 'main-course'],
  },
  jollofSpaghettiChickenAi: {
    src: 'uploads/delishpot-jollof-spaghetti-chicken-ai.png',
    alt: 'Jollof spaghetti served with chicken.',
    tags: ['spaghetti', 'jollof', 'chicken', 'main-course'],
  },
  jollofSpaghettiTurkeyAi: {
    src: 'uploads/delishpot-jollof-spaghetti-turkey-ai.png',
    alt: 'Jollof spaghetti served with turkey.',
    tags: ['spaghetti', 'jollof', 'turkey', 'main-course'],
  },
  jollofRiceChickenAi: {
    src: 'uploads/delishpot-jollof-rice-chicken-ai.png',
    alt: 'Jollof rice served with chicken on a white plate.',
    tags: ['jollof', 'rice', 'chicken', 'main-course'],
  },
  jollofRiceBeefAi: {
    src: 'uploads/delishpot-jollof-rice-beef-ai.png',
    alt: 'Jollof rice served with beef on a white plate.',
    tags: ['jollof', 'rice', 'beef', 'main-course'],
  },
  ofadaRiceSauceAi: {
    src: 'uploads/delishpot-ofada-rice-sauce-ai.png',
    alt: 'Ofada rice served with rich ofada sauce.',
    tags: ['ofada', 'rice', 'sauce', 'main-course'],
  },
  yamEggSauceAi: {
    src: 'uploads/delishpot-boiled-yam-egg-sauce-ai.png',
    alt: 'Boiled yam served with egg sauce.',
    tags: ['yam', 'egg-sauce', 'main-course'],
  },
  chickenShawarmaAi: {
    src: 'uploads/delishpot-chicken-shawarma-ai.png',
    alt: 'Chicken shawarma wrap on a white plate.',
    tags: ['shawarma', 'chicken', 'main-course'],
  },
  bakedPotatoesFishSauceAi: {
    src: 'uploads/delishpot-baked-potatoes-fish-sauce-ai.png',
    alt: 'Baked potatoes served with fish sauce.',
    tags: ['potatoes', 'fish-sauce', 'main-course'],
  },
  friedRiceBeefAi: {
    src: 'uploads/delishpot-fried-rice-beef-ai.png',
    alt: 'Fried rice served with beef pieces.',
    tags: ['fried-rice', 'beef', 'main-course'],
  },
  turkeyPeppersoupAi: {
    src: 'uploads/delishpot-turkey-peppersoup-ai.png',
    alt: 'Turkey pepper soup in a white bowl.',
    tags: ['turkey', 'peppersoup', 'soup'],
  },
  chickenPeppersoupAi: {
    src: 'uploads/delishpot-chicken-peppersoup-ai.png',
    alt: 'Chicken pepper soup in a white bowl.',
    tags: ['chicken', 'peppersoup', 'soup'],
  },
  assortedMeatPeppersoupAi: {
    src: 'uploads/delishpot-assorted-meat-peppersoup-ai.png',
    alt: 'Assorted meat pepper soup in a white bowl.',
    tags: ['assorted-meat', 'peppersoup', 'soup'],
  },
  plantainMealAi: {
    src: 'uploads/delishpot-plantain-meal-ai.png',
    alt: 'Fried plantain served with a side of pepper sauce.',
    tags: ['plantain', 'meal', 'sides'],
  },
};

/* Menu data lifted from the brand menu cards. NGN. */
const MENU = {
  mains: [
    { id: 'jollof-chicken', name: 'Jollof Rice & Chicken', price: 4400, tag: 'Signature', desc: 'Smoky party-style jollof with chicken.' },
    { id: 'jollof-beef', name: 'Jollof Rice & Beef', price: 4180, desc: 'Smoky jollof served with beef.' },
    { id: 'yam-egg', name: 'Boiled Yam & Egg Sauce', price: 4400, desc: 'Boiled yam served with peppery egg sauce.' },
    { id: 'yam-fish', name: 'Boiled Yam & Fish Sauce', price: 4400, desc: 'Boiled yam served with rich fish sauce.' },
    { id: 'fried-chicken', name: 'Fried Rice & Chicken', price: 4400, desc: 'Vegetable fried rice served with chicken.' },
    { id: 'fried-beef', name: 'Fried Rice & Beef', price: 4180, desc: 'Vegetable fried rice served with beef.' },
    { id: 'ofada', name: 'Ofada Rice & Sauce', price: 5500, tag: 'Heritage', desc: 'Locally grown ofada rice with ofada sauce.' },
    { id: 'pot-fish', name: 'Baked Potatoes & Fish Sauce', price: 4400, desc: 'Baked potatoes served with fish sauce.' },
    { id: 'pasta-chicken', name: 'Pasta & Chicken', price: 4000, desc: 'Spaghetti in tomato basil sauce, grilled chicken.' },
    { id: 'bole', name: 'Bole & Fish Sauce', price: 4000, desc: 'Roasted plantain with smoked fish pepper sauce.' },
    { id: 'plantain-egg', name: 'Plantain & Fried Egg', price: 4000, desc: 'Fried plantain stacks with seasoned egg.' },
    { id: 'plantain-meal', name: 'Plantain Meal', price: 4400, desc: 'Plantain meal from the current menu.' },
    { id: 'turkey-pep', name: 'Turkey Pepper Soup', price: 11000, desc: 'Slow-simmered turkey in spiced pepper soup broth.' },
    { id: 'chicken-pep', name: 'Chicken Peppersoup', price: 10000, desc: 'Whole chicken bone-broth, scent leaf, uziza.' },
    { id: 'assorted-pep', name: 'Assorted Meat Peppersoup', price: 10000, desc: 'Goat, beef, tripe — house spice blend.' },
    { id: 'special-fried', name: 'Special Fried Rice', price: 7000, tag: 'Chef pick', desc: 'Prawns, sausage, mixed veg, scrambled egg.' },
    { id: 'jollof-spag', name: 'Jollof Spaghetti & Chicken', price: 4000, desc: 'Spiced jollof spaghetti with chicken.' },
    { id: 'jollof-spag-turkey', name: 'Jollof Spaghetti & Turkey', price: 6150, desc: 'Spiced jollof spaghetti with turkey.' },
    { id: 'sandwich', name: 'Sandwich', price: 4400, desc: 'Toasted sandwich from the current menu.' },
    { id: 'shawarma', name: 'Chicken Shawarma', price: 4400, desc: 'Chicken shawarma from the current menu.' },
  ],
  extras: [
    { id: 'caesar', name: 'Ceasar Salad', price: 10000 },
    { id: 'naija-salad', name: 'Nigerian Salad', price: 6000 },
    { id: 'tenders', name: 'Chicken Tenders', price: 6000 },
    { id: 'wings', name: 'Spicy Chicken Wings', price: 6000 },
    { id: 'plantain-side', name: 'Plantain Side', price: 1000 },
    { id: 'boiled-egg', name: 'Boiled Egg', price: 660 },
    { id: 'fish-sauce', name: 'Fish Sauce', price: 2200 },
    { id: 'egg-sauce', name: 'Egg Sauce', price: 2200 },
    { id: 'jollof-side', name: 'Jollof Rice', price: 2750 },
    { id: 'fried-side', name: 'Fried Rice', price: 2750 },
    { id: 'ponmo', name: 'Peppered Ponmo', price: 1500 },
    { id: 'grilled-turkey', name: 'Grilled Turkey', price: 3000 },
    { id: 'fried-ake', name: 'Fried Ake Fish', price: 2500 },
    { id: 'bread', name: 'Bread', price: 660 },
    { id: 'fried-egg', name: 'Fried Egg', price: 2200 },
    { id: 'beef-1', name: 'Beef', price: 1320 },
    { id: 'mashed', name: 'Mashed Potato', price: 4400 },
    { id: 'baked-pot', name: 'Baked Potatoes', price: 2000 },
  ],
  bulk: [
    { id: 'b-stew', name: '3L Chicken Stew', price: 35000, serves: 'Serves 12–15' },
    { id: 'b-egusi', name: '3L Egusi Soup', price: 35000, serves: 'Serves 12–15' },
    { id: 'b-efo', name: '2L Efo-riro (Vegetable)', price: 35000, serves: 'Serves 8–10' },
    { id: 'b-oha', name: '2L Oha Soup', price: 35000, serves: 'Serves 8–10' },
    { id: 'b-afang', name: '2L Afang Soup', price: 35000, serves: 'Serves 8–10' },
    { id: 'b-edi', name: '2L Edikaikong', price: 35000, serves: 'Serves 8–10' },
    { id: 'b-jollof', name: '2L Jollof Rice', price: 25500, serves: 'Serves 8–10' },
    { id: 'b-fried', name: '2L Fried Rice', price: 25500, serves: 'Serves 8–10' },
    { id: 'b-sfr', name: '1L Special Fried Rice', price: 20000, serves: 'Serves 4–6' },
    { id: 'b-ofada', name: '2L Ofada Sauce', price: 35000, serves: 'Serves 8–10' },
    { id: 'b-chk-tray', name: 'Grilled Chicken Tray', price: 16000, serves: '1 full bird' },
    { id: 'b-tky-tray', name: 'Grilled Turkey Tray', price: 30000, serves: '1 full bird' },
  ],
};

const MENU_IMAGE_IDS = {
  'jollof-chicken': 'jollofRiceChickenAi',
  'jollof-beef': 'jollofRiceBeefAi',
  'yam-egg': 'yamEggSauceAi',
  'yam-fish': 'yamFishPlate',
  'fried-chicken': 'friedRiceChicken',
  'fried-beef': 'friedRiceBeefAi',
  'ofada': 'ofadaRiceSauceAi',
  'pot-fish': 'bakedPotatoesFishSauceAi',
  'pasta-chicken': 'jollofSpaghetti',
  'bole': 'plantainMealAi',
  'plantain-egg': 'plantainMealAi',
  'plantain-meal': 'plantainMealAi',
  'turkey-pep': 'turkeyPeppersoupAi',
  'chicken-pep': 'chickenPeppersoupAi',
  'assorted-pep': 'assortedMeatPeppersoupAi',
  'special-fried': 'friedRiceChickenDetail',
  'jollof-spag': 'jollofSpaghettiChickenAi',
  'jollof-spag-turkey': 'jollofSpaghettiTurkeyAi',
  'sandwich': 'chickenSandwich',
  'shawarma': 'chickenShawarmaAi',
  'caesar': 'chickenSandwich',
  'naija-salad': 'chickenSandwich',
  'tenders': 'friedRiceChicken',
  'wings': 'friedRiceChicken',
  'plantain-side': 'plantainMealAi',
  'boiled-egg': 'eggSauce',
  'fish-sauce': 'yamFishOverhead',
  'egg-sauce': 'eggSauce',
  'jollof-side': 'jollofRiceChickenAi',
  'fried-side': 'specialFriedRice',
  'ponmo': 'assortedMeatPeppersoupAi',
  'grilled-turkey': 'turkeyPeppersoupAi',
  'fried-ake': 'pepperedFishPlate',
  'bread': 'chickenSandwich',
  'fried-egg': 'eggSauce',
  'beef-1': 'jollofRiceBeefAi',
  'mashed': 'bakedPotatoesFishSauceAi',
  'baked-pot': 'bakedPotatoesFishSauceAi',
  'b-stew': 'bulkSoupTub',
  'b-egusi': 'bulkSoupTub',
  'b-efo': 'vegetableSoupTub',
  'b-oha': 'vegetableSoupTub',
  'b-afang': 'vegetableSoupTub',
  'b-edi': 'vegetableSoupTub',
  'b-jollof': 'vegetableSoupTub',
  'b-fried': 'vegetableSoupTub',
  'b-sfr': 'vegetableSoupTub',
  'b-ofada': 'vegetableSoupTub',
  'b-chk-tray': 'jollofRiceChickenAi',
  'b-tky-tray': 'turkeyPeppersoupAi',
};

Object.values(MENU).forEach(items => items.forEach(item => {
  if (MENU_IMAGE_IDS[item.id]) item.imageId = MENU_IMAGE_IDS[item.id];
}));

const CATEGORIES = [
  { id: 'mains', label: 'Main Course', count: MENU.mains.length },
  { id: 'extras', label: 'Extras & Sides', count: MENU.extras.length },
  { id: 'bulk', label: 'Bulk Orders', count: MENU.bulk.length },
];

const FEATURED_IDS = ['special-fried', 'yam-egg', 'jollof-spag', 'yam-fish'];

const ngn = (n) => '₦' + n.toLocaleString('en-NG');

Object.assign(window, { PALETTE, FOOD_IMAGES, MENU, CATEGORIES, FEATURED_IDS, ngn });
