// data.jsx — sample restaurants, menus, and order seeds

const RESTAURANTS = [
  {
    id: 'rojo-smoke', slug: 'rojo-smoke',
    name: 'Rojo & Smoke',
    tagline: 'Slow-smoked Tex-Mex',
    cuisine: 'Tex-Mex · BBQ',
    cover: 'bbq', hue: 'bbq', logo: 'orange', heroArt: 'brisket',
    rating: 4.8, reviews: 412,
    eta: '15–20 min', etaShort: '15 min',
    deliveryFee: 1.99, minOrder: 12,
    distance: '1.2 mi', area: 'Milton Keynes',
    status: 'cooking', statusLabel: 'Cooking now',
    featured: true, featuredBadge: 'Wrangler\'s Pick',
    tags: ['pickup', 'free'],
    description: 'Brisket from 4am, salsa from scratch. The bull\'s favourite stop on the trail.',
  },
  {
    id: 'maverick-burger', slug: 'maverick-burger',
    name: 'Maverick\'s Burger',
    tagline: 'Smash burgers, no compromise',
    cuisine: 'Smash · Cheese',
    cover: 'bun', hue: 'bun', logo: 'sun', heroArt: 'burger',
    rating: 4.7, reviews: 1284,
    eta: '20–25 min', etaShort: '20 min',
    deliveryFee: 2.49, minOrder: 10,
    distance: '0.8 mi', area: 'Downtown',
    status: 'live', statusLabel: 'Open',
    featured: true,
    tags: ['pickup', 'value'],
    description: 'Smashed thin, double cheese, brioche bun. That\'s the whole secret.',
  },
  {
    id: 'cactus-cream', slug: 'cactus-cream',
    name: 'Cactus & Cream',
    tagline: 'Coffee. Sweets. Slow mornings.',
    cuisine: 'Sweets · Coffee',
    cover: 'sweet', hue: 'sweet', logo: 'brown', heroArt: 'drink',
    rating: 4.9, reviews: 268,
    eta: '10–15 min', etaShort: '10 min',
    deliveryFee: 0.99, minOrder: 8,
    distance: '0.4 mi', area: 'Central Milton Keynes',
    status: 'live', statusLabel: 'Open',
    tags: ['free', 'value', 'eco', 'pickup'],
    description: 'Pastries baked at 5am. Single-origin pour-over. No syrups, no fuss.',
  },
  // Lighter cards for grid fill
  { id: 'sundown-tacos', slug: 'sundown-tacos', name: 'Sundown Tacos', tagline: 'Tacos al pastor, the right way', cuisine: 'Tacos · Salsas', hue: 'orange', heroArt: 'taco', rating: 4.6, reviews: 612, eta: '25 min', etaShort: '25 min', deliveryFee: 2.99, minOrder: 9, distance: '1.4 mi', status: 'delayed', statusLabel: 'Delayed', tags: ['pickup'] },
  { id: 'iron-noodle', slug: 'iron-noodle', name: 'Iron Noodle', tagline: 'Hand-pulled, wok-fired', cuisine: 'Asian · Noodles', hue: 'red', heroArt: 'noodles', rating: 4.5, reviews: 318, eta: '30 min', etaShort: '30 min', deliveryFee: 2.49, minOrder: 12, distance: '1.1 mi', status: 'live', statusLabel: 'Open', tags: ['value'] },
  { id: 'mesa-greens', slug: 'mesa-greens', name: 'Mesa Greens', tagline: 'Bowls, grains, good leaves', cuisine: 'Healthy · Bowls', hue: 'green', heroArt: 'bowl', rating: 4.6, reviews: 142, eta: '18 min', etaShort: '18 min', deliveryFee: 1.99, minOrder: 10, distance: '0.5 mi', status: 'live', statusLabel: 'Open', tags: ['vegan', 'eco', 'value', 'free'] },
  { id: 'verde-vegano', slug: 'verde-vegano', name: 'Verde Vegano', tagline: 'Plant-built, planet-kind', cuisine: 'Vegan · Bowls', hue: 'green', heroArt: 'bowl', rating: 4.7, reviews: 204, eta: '20 min', etaShort: '20 min', deliveryFee: 1.49, minOrder: 9, distance: '0.6 mi', status: 'live', statusLabel: 'Open', tags: ['vegan', 'eco', 'value', 'free', 'pickup'] },
  { id: 'dune-coffee', slug: 'dune-coffee', name: 'Dune Coffee', tagline: 'Desert-roasted, slow-poured', cuisine: 'Coffee · Bakery', hue: 'coffee', heroArt: 'iced-latte', rating: 4.8, reviews: 389, eta: '12 min', etaShort: '12 min', deliveryFee: 0.99, minOrder: 6, distance: '0.3 mi', status: 'live', statusLabel: 'Open', tags: ['free', 'value', 'eco', 'pickup'] },
  { id: 'city-convenience', slug: 'city-convenience', name: 'City Convenience', tagline: 'Cold drinks, snacks, quick shelf picks', cuisine: 'Convenience · Drinks', hue: 'coffee', heroArt: 'lemonade', rating: 4.5, reviews: 96, eta: '5 min', etaShort: '5 min', deliveryFee: 0.99, minOrder: 5, distance: '0.2 mi', status: 'live', statusLabel: 'Open', tags: ['pickup', 'value'] },
  { id: 'big-tex-pizza', slug: 'big-tex-pizza', name: 'Big Tex Pizza', tagline: 'Wood-fired, Texas-sized', cuisine: 'Pizza · Italian', hue: 'red', heroArt: 'pizza', rating: 4.5, reviews: 741, eta: '28 min', etaShort: '28 min', deliveryFee: 2.49, minOrder: 14, distance: '1.5 mi', status: 'live', statusLabel: 'Open', tags: ['pickup'] },
  { id: 'canteen-bowls', slug: 'canteen-bowls', name: 'Canteen', tagline: 'Grain bowls & good greens', cuisine: 'Healthy · Bowls', hue: 'green', heroArt: 'bowl', rating: 4.4, reviews: 166, eta: '16 min', etaShort: '16 min', deliveryFee: 1.99, minOrder: 10, distance: '0.5 mi', status: 'live', statusLabel: 'Open', tags: ['vegan', 'eco', 'value', 'free'] },
  { id: 'prairie-pies', slug: 'prairie-pies', name: 'Prairie Pies', tagline: 'Hand pies & warm bakes', cuisine: 'Bakery · Sweets', hue: 'sweet', heroArt: 'cake', rating: 4.6, reviews: 233, eta: '22 min', etaShort: '22 min', deliveryFee: 1.99, minOrder: 8, distance: '0.9 mi', status: 'live', statusLabel: 'Open', tags: ['free', 'pickup'] },
  { id: 'wok-this-way', slug: 'wok-this-way', name: 'Wok This Way', tagline: 'Fast wok, big flavour', cuisine: 'Asian · Street', hue: 'red', heroArt: 'chinese', rating: 4.3, reviews: 512, eta: '24 min', etaShort: '24 min', deliveryFee: 1.99, minOrder: 11, distance: '1.1 mi', status: 'live', statusLabel: 'Open', tags: ['value', 'free'] },
];

const RESTAURANT_LOOKUP = Object.fromEntries(RESTAURANTS.map(r => [r.id, r]));

// Full menus for the three anchor restaurants
const MENUS = {
  'rojo-smoke': [
    { id: 'cat-popular', name: 'Popular', items: [
      { id: 'rs-brisket-tacos', name: 'Brisket Tacos · trio', desc: 'Slow-smoked brisket, charred onion, salsa roja, warm corn tortillas.', price: 14.50, kcal: 720, hue: 'orange', glyph: 'taco', art: 'taco', popular: true, diet: [], modifiers: 'tacos' },
      { id: 'rs-ranch-burger', name: 'Ranch Burger', desc: 'Double-stack, smoked cheddar, crispy onion, chipotle aioli.', price: 13.00, kcal: 880, hue: 'bbq', art: 'double-burger', popular: true, modifiers: 'burger' },
      { id: 'rs-burnt-ends', name: 'Burnt Ends', desc: 'Twice-cooked brisket caps, hot sauce on the side.', price: 16.00, kcal: 640, hue: 'bbq', art: 'burntends', new: true },
    ]},
    { id: 'cat-pit', name: 'Smoke pit', items: [
      { id: 'rs-pulled-pork', name: 'Pulled Pork Sandwich', desc: 'House BBQ rub, slaw, pickles, brioche.', price: 12.00, kcal: 780, hue: 'bun', art: 'pulled-pork', modifiers: 'sandwich' },
      { id: 'rs-ribs-half', name: 'Half-Rack Ribs', desc: 'Mesquite-smoked 6 hours, dry-rubbed, glazed.', price: 22.00, kcal: 1100, hue: 'bbq', art: 'ribs' },
      { id: 'rs-brisket-plate', name: 'Brisket Plate', desc: 'Quarter-pound moist brisket, two sides, bread.', price: 18.50, kcal: 920, hue: 'bbq', art: 'brisket' },
    ]},
    { id: 'cat-grill', name: 'On the grill', items: [
      { id: 'rs-wings', name: 'Mesquite Wings · 6', desc: 'Smoked then flashed crisp. Dry rub or hot honey.', price: 11.50, kcal: 560, hue: 'orange', art: 'wings', modifiers: 'wings' },
      { id: 'rs-skirt', name: 'Skirt Steak Taco', desc: 'Char-grilled skirt, lime, cilantro, salsa verde.', price: 13.50, kcal: 540, hue: 'red', art: 'steak-taco' },
    ]},
    { id: 'cat-sides', name: 'Sides & sips', items: [
      { id: 'rs-slaw', name: 'Mesa Slaw', desc: 'Cabbage, lime, cumin, toasted pepitas.', price: 4.50, kcal: 180, hue: 'green', art: 'bowl', diet: ['v'] },
      { id: 'rs-mac', name: 'Smoked Mac', desc: 'Three cheeses, brisket crumb on top.', price: 6.50, kcal: 480, hue: 'bun', art: 'mac' },
      { id: 'rs-lemonade', name: 'House Lemonade', desc: 'Pressed daily, light agave.', price: 4.50, kcal: 120, hue: 'sweet', art: 'lemonade', diet: ['v', 'gf'] },
      { id: 'rs-horchata', name: 'Horchata', desc: 'Rice, cinnamon, vanilla. Served cold.', price: 4.50, kcal: 220, hue: 'cream', art: 'iced-latte', diet: ['v'] },
    ]},
  ],
  'maverick-burger': [
    { id: 'cat-burgers', name: 'Burgers', items: [
      { id: 'mb-classic', name: 'The Maverick', desc: 'Double smash, American cheese, pickles, secret sauce.', price: 11.00, kcal: 720, hue: 'bun', art: 'burger', popular: true, modifiers: 'burger' },
      { id: 'mb-triple', name: 'Triple Trouble', desc: 'Three patties, three cheese, smoked bacon.', price: 14.50, kcal: 1080, hue: 'bbq', art: 'double-burger', new: true, modifiers: 'burger' },
      { id: 'mb-shroom', name: 'Field Shroom', desc: 'Portobello stack, Swiss, caramelised onion.', price: 10.50, kcal: 560, hue: 'green', art: 'veggie-burger', diet: ['v'] },
    ]},
    { id: 'cat-sides', name: 'Sides', items: [
      { id: 'mb-fries', name: 'Hand-Cut Fries', desc: 'Russets, twice-fried, sea salt.', price: 4.50, kcal: 420, hue: 'sweet', art: 'fries', diet: ['v'] },
      { id: 'mb-onion-rings', name: 'Onion Rings', desc: 'Beer-battered, peppered.', price: 5.00, kcal: 460, hue: 'bun', art: 'onion-rings', diet: ['v'] },
    ]},
    { id: 'cat-shakes', name: 'Shakes', items: [
      { id: 'mb-vanilla', name: 'Vanilla Shake', desc: 'Madagascar vanilla, whipped cream.', price: 5.50, kcal: 580, hue: 'cream', art: 'shake' },
      { id: 'mb-choc', name: 'Chocolate Shake', desc: 'Dark chocolate, malted milk.', price: 5.50, kcal: 620, hue: 'coffee', art: 'shake' },
    ]},
  ],
  'cactus-cream': [
    { id: 'cat-coffee', name: 'Coffee', items: [
      { id: 'cc-flat', name: 'Flat White', desc: 'Double ristretto, silk-textured whole milk.', price: 4.20, kcal: 110, hue: 'coffee', art: 'iced-latte', popular: true, modifiers: 'coffee' },
      { id: 'cc-cortado', name: 'Cortado', desc: 'Equal parts espresso and warm milk.', price: 3.80, kcal: 80, hue: 'coffee', art: 'coffee' },
      { id: 'cc-pour', name: 'Pour Over', desc: 'Single-origin, hand-poured V60.', price: 5.00, kcal: 0, hue: 'coffee', art: 'coffee', diet: ['v'] },
    ]},
    { id: 'cat-pastry', name: 'Pastries', items: [
      { id: 'cc-croiss', name: 'Butter Croissant', desc: 'Laminated 72 hours. Crisp on the outside.', price: 4.20, kcal: 320, hue: 'bun', art: 'cinnamon' },
      { id: 'cc-cinn', name: 'Cinnamon Knot', desc: 'Pulled, twisted, glazed warm.', price: 4.80, kcal: 380, hue: 'sweet', art: 'cinnamon', popular: true },
      { id: 'cc-choc', name: 'Pain au Chocolat', desc: 'Dark Valrhona batons, double-folded.', price: 4.80, kcal: 400, hue: 'coffee', art: 'pastry' },
    ]},
  ],
};

// Generic fallback menu — used for restaurants without a bespoke menu
const GENERIC_MENU = [
  { id: 'g-popular', name: 'Popular', items: [
    { id: 'g-signature', name: 'Signature Plate', desc: 'The house favourite — generous and made to order.', price: 13.50, kcal: 680, hue: 'orange', glyph: 'bowl', art: 'taco', popular: true },
    { id: 'g-bowl', name: 'House Bowl', desc: 'Seasonal greens, grains, and a punchy dressing.', price: 11.00, kcal: 520, hue: 'green', glyph: 'bowl', art: 'bowl', diet: ['v'] },
    { id: 'g-wrap', name: 'Loaded Wrap', desc: 'Stuffed, rolled, griddled till crisp.', price: 9.50, kcal: 610, hue: 'bun', glyph: 'bowl', art: 'sandwich' },
  ]},
  { id: 'g-mains', name: 'Mains', items: [
    { id: 'g-grill', name: 'Grill Special', desc: 'Char-grilled with two sides of your choice.', price: 15.50, kcal: 840, hue: 'bbq', glyph: 'bowl', art: 'brisket' },
    { id: 'g-noodle', name: 'Wok Noodles', desc: 'Tossed fast and hot with crunchy veg.', price: 12.00, kcal: 720, hue: 'red', glyph: 'bowl', art: 'noodles', diet: ['v'] },
  ]},
  { id: 'g-sides', name: 'Sides & sips', items: [
    { id: 'g-fries', name: 'Skin-On Fries', desc: 'Twice-fried, sea salt.', price: 4.50, kcal: 420, hue: 'sweet', glyph: 'bowl', art: 'fries', diet: ['v'] },
    { id: 'g-lemonade', name: 'House Lemonade', desc: 'Pressed daily, light agave.', price: 4.00, kcal: 120, hue: 'sweet', glyph: 'drink', art: 'lemonade', diet: ['v', 'gf'] },
  ]},
];

// Modifier groups (drives modifier modal)
const MODIFIERS = {
  tacos: {
    title: 'Customise your tacos',
    groups: [
      { id: 'tortilla', title: 'Tortilla', desc: 'Pick one', required: true, max: 1, options: [
        { id: 't-corn', name: 'Warm corn', price: 0, default: true },
        { id: 't-flour', name: 'Soft flour', price: 0 },
        { id: 't-lettuce', name: 'Lettuce wrap', price: 0.50 },
      ]},
      { id: 'heat', title: 'Heat', desc: 'Pick one', required: true, max: 1, options: [
        { id: 'h-mild', name: 'Mild', price: 0, default: true },
        { id: 'h-med', name: 'Medium', price: 0 },
        { id: 'h-hot', name: 'Hot — really', price: 0 },
      ]},
      { id: 'extras', title: 'Add extras', desc: 'Up to 3', max: 3, options: [
        { id: 'e-guac', name: 'Guacamole', price: 2.00 },
        { id: 'e-cheese', name: 'Smoked cheddar', price: 1.50 },
        { id: 'e-onion', name: 'Pickled onion', price: 0.75 },
        { id: 'e-jala', name: 'Roasted jalapeño', price: 1.00 },
      ]},
    ],
  },
  burger: {
    title: 'Build your burger',
    groups: [
      { id: 'patty', title: 'Patty', desc: 'Pick one', required: true, max: 1, options: [
        { id: 'p-single', name: 'Single', price: 0, default: true },
        { id: 'p-double', name: 'Double', price: 2.50 },
        { id: 'p-triple', name: 'Triple', price: 4.50 },
      ]},
      { id: 'cheese', title: 'Cheese', max: 1, options: [
        { id: 'c-amer', name: 'American', price: 0, default: true },
        { id: 'c-cheddar', name: 'Smoked cheddar', price: 0.50 },
        { id: 'c-blue', name: 'Blue cheese', price: 1.00 },
        { id: 'c-none', name: 'No cheese', price: 0 },
      ]},
      { id: 'addons', title: 'Add-ons', desc: 'Up to 4', max: 4, options: [
        { id: 'a-bacon', name: 'Smoked bacon', price: 2.00 },
        { id: 'a-egg', name: 'Fried egg', price: 1.50 },
        { id: 'a-avo', name: 'Avocado', price: 1.50 },
        { id: 'a-jala', name: 'Jalapeño', price: 0.75 },
        { id: 'a-onion', name: 'Crispy onion', price: 0.75 },
      ]},
    ],
  },
  coffee: {
    title: 'Make it yours',
    groups: [
      { id: 'milk', title: 'Milk', max: 1, options: [
        { id: 'm-whole', name: 'Whole milk', price: 0, default: true },
        { id: 'm-oat', name: 'Oat milk', price: 0.50 },
        { id: 'm-almond', name: 'Almond milk', price: 0.50 },
      ]},
      { id: 'shot', title: 'Shot', max: 1, options: [
        { id: 's-2', name: 'Double shot', price: 0, default: true },
        { id: 's-3', name: 'Triple shot', price: 0.80 },
        { id: 's-decaf', name: 'Decaf', price: 0 },
      ]},
    ],
  },
  wings: {
    title: 'Pick your wings',
    groups: [
      { id: 'sauce', title: 'Sauce', required: true, max: 1, options: [
        { id: 'sa-dry', name: 'Dry rub', price: 0, default: true },
        { id: 'sa-hothoney', name: 'Hot honey', price: 0 },
        { id: 'sa-bbq', name: 'House BBQ', price: 0 },
      ]},
    ],
  },
  sandwich: {
    title: 'Customise',
    groups: [
      { id: 'bread', title: 'Bread', max: 1, options: [
        { id: 'b-brioche', name: 'Brioche', price: 0, default: true },
        { id: 'b-sour', name: 'Sourdough', price: 0 },
      ]},
      { id: 'extras', title: 'Extras', max: 3, options: [
        { id: 'e-slaw', name: 'Extra slaw', price: 1.00 },
        { id: 'e-pickle', name: 'Extra pickles', price: 0.50 },
      ]},
    ],
  },
};

// Saved customer addresses
const ADDRESSES = [
  { id: 'a1', label: 'Home', line1: '353 Avebury Boulevard', line2: 'Flat 915, Almere', city: 'Milton Keynes', postcode: 'MK9 2JH', notes: 'Almere building. Flat 915.', default: true },
  { id: 'a2', label: 'Work', line1: '500 Avebury Boulevard', line2: 'Central Milton Keynes', city: 'Milton Keynes', postcode: 'MK9 2BE', notes: 'Reception will hold.' },
];

// Past orders (history)
const PAST_ORDERS = [
  { id: 'LSO-23191', restaurantId: 'maverick-burger', date: 'May 24', total: 18.50, status: 'delivered', items: 2 },
  { id: 'LSO-22087', restaurantId: 'cactus-cream', date: 'May 21', total: 8.40, status: 'delivered', items: 2 },
  { id: 'LSO-21054', restaurantId: 'rojo-smoke', date: 'May 18', total: 34.50, status: 'delivered', items: 4 },
  { id: 'LSO-19922', restaurantId: 'sundown-tacos', date: 'May 12', total: 22.00, status: 'cancelled', items: 3 },
];

// Customer profile (matches rpc_lasso_get_customer_profile shape)
const PROFILE = {
  display_name: 'Jordan Mason',
  initials: 'JM',
  email: 'jordan@lasso.io',
  rank_label: 'Drover',
  rank_icon: 'badge',
  xp_points: 1840,
  xp_to_next: 660,
  xp_total_next: 2500,
  total_orders: 47,
  total_spend: 612.40,
  streak_current: 6,
  streak_best: 12,
  wallet_balance: 14.50,
  badge_count: 11,
  badges: [
    { id: 'b1', name: 'First Ride', desc: 'Placed your first order', earned: true, kind: 'orange' },
    { id: 'b2', name: 'Early Bird', desc: 'Ordered before 7am, 3x', earned: true, kind: 'sun' },
    { id: 'b3', name: 'Trail Boss', desc: '£500 in orders', earned: true, kind: 'gold' },
    { id: 'b4', name: 'Roundup', desc: 'Ordered with 4 friends', earned: false, kind: 'gray' },
    { id: 'b5', name: 'Wrangler', desc: 'Reviewed 25 restaurants', earned: false, kind: 'gray' },
  ],
  challenges: [
    { id: 'c1', title: 'Three for the trail', desc: 'Order 3 times this week', xp: 250, progress: 2, total: 3, expires: '3 days', icon: 'flame' },
    { id: 'c2', title: 'Wrangler\'s tip', desc: 'Leave a review on your next delivery', xp: 100, progress: 0, total: 1, expires: '5 days', icon: 'star' },
  ],
  loyalty: [
    { id: 'l1', cardName: 'Buy 8, get 1', restaurantId: 'cactus-cream', restaurantName: 'Cactus & Cream', stamps: 5, total: 8, reward: 'Free pastry' },
    { id: 'l2', cardName: 'Coffee club', restaurantId: 'cactus-cream', restaurantName: 'Cactus & Cream', stamps: 3, total: 10, reward: 'Free drink' },
  ],
};

// Earned promo codes — surfaced in the cart + checkout
const EARNED_PROMOS = [
  { code: 'WELCOME20', label: '20% off your order', sub: 'Welcome reward · up to £8 off', type: 'pct', value: 0.20, cap: 8, expires: 'Jul 21' },
  { code: 'POSSE10', label: '£10 off any order', sub: 'Referral reward — Maya joined', type: 'fixed', value: 10, expires: 'Aug 02' },
  { code: 'FREETRAIL', label: 'Free delivery', sub: 'Streak week 6 reward', type: 'freedel', value: 0, expires: 'Jul 12' },
];

// Pound value of a promo for a given basket
function promoValue(p, subtotal, deliveryFee) {
  if (!p) return 0;
  if (p.type === 'pct') return Math.min(subtotal * p.value, p.cap || 99);
  if (p.type === 'fixed') return Math.min(p.value, subtotal);
  if (p.type === 'freedel') return deliveryFee;
  return 0;
}

// Friends — the posse
const FRIENDS = [
  { id: 'f1', name: 'Maya Torres', initials: 'MT', orders: 23, mutual: 'Rojo & Smoke regular', online: true },
  { id: 'f2', name: 'Cole Barrett', initials: 'CB', orders: 41, mutual: 'Rode with you 4×', online: false },
  { id: 'f3', name: 'Priya Shah', initials: 'PS', orders: 12, mutual: 'New to the posse', online: true },
];

// Full receipt data for past orders
const PAST_ORDER_DETAILS = {
  'LSO-23191': { items: [{ name: 'The Maverick', qty: 1, price: 11.00 }, { name: 'Hand-Cut Fries', qty: 1, price: 4.50 }], fee: 2.49, tip: 1.50, discount: 0.99, discountLabel: 'Loyalty stamp', card: 'Visa · 4242', time: 'May 24 · 7:42 PM', address: '353 Avebury Boulevard, Flat 915, Almere', rider: 'Diego M.', xp: 45 },
  'LSO-22087': { items: [{ name: 'Flat White', qty: 1, price: 4.20 }, { name: 'Cinnamon Knot', qty: 1, price: 4.80 }], fee: 0.99, tip: 0, discount: 1.59, discountLabel: 'Coffee club', card: 'Apple Pay', time: 'May 21 · 8:12 AM', address: '500 Avebury Boulevard, Central Milton Keynes', rider: 'Rosa D.', xp: 20 },
  'LSO-21054': { items: [{ name: 'Brisket Tacos · trio', qty: 1, price: 14.50 }, { name: 'Pulled Pork Sandwich', qty: 1, price: 12.00 }, { name: 'Mesa Slaw', qty: 1, price: 4.50 }, { name: 'House Lemonade', qty: 1, price: 4.50 }], fee: 1.99, tip: 0, discount: 2.99, discountLabel: 'WELCOME20', card: 'Visa · 4242', time: 'May 18 · 6:58 PM', address: '353 Avebury Boulevard, Flat 915, Almere', rider: 'Diego M.', xp: 80 },
  'LSO-19922': { items: [{ name: 'Signature Plate', qty: 1, price: 13.50 }, { name: 'Skin-On Fries', qty: 1, price: 4.50 }, { name: 'House Lemonade', qty: 1, price: 4.00 }], fee: 0, tip: 0, discount: 0, card: 'Visa · 4242', time: 'May 12 · 9:20 PM', address: '353 Avebury Boulevard, Flat 915, Almere', refunded: true, note: 'Cancelled by kitchen — refunded in full.' },
};

// My posted reviews
const MY_REVIEWS = [
  { id: 'rv3', restaurantId: 'maverick-burger', rating: 5, text: 'Double smash, zero notes. Fries survived the ride crispy.', date: 'May 24', helpful: 8 },
  { id: 'rv1', restaurantId: 'rojo-smoke', rating: 5, text: 'Brisket tacos still undefeated. Diego was 4 minutes early.', date: 'May 18', photo: true, helpful: 12 },
];

// Wallet gifts received from friends
const GIFTS_RECEIVED = [
  { id: 'g1', friendId: 'f1', from: 'Maya Torres', initials: 'MT', amount: 10, note: 'For covering lunch last week', date: 'Jun 30' },
  { id: 'g2', friendId: 'f2', from: 'Cole Barrett', initials: 'CB', amount: 5, note: 'Taco Tuesday on me, partner', date: 'Jun 12' },
];

Object.assign(window, {
  RESTAURANTS, RESTAURANT_LOOKUP, MENUS, GENERIC_MENU, MODIFIERS, ADDRESSES, PAST_ORDERS, PROFILE,
  EARNED_PROMOS, promoValue, FRIENDS, PAST_ORDER_DETAILS, MY_REVIEWS, GIFTS_RECEIVED,
});
