@extends('layouts.public') @section('content') @php /** @var array $deals */ @endphp

{{ t_raw('header.mega_deals_offers') }}

@php /* The page's messages belong UNDER its title band, inside the page the reader is looking at — not floating above it. getFlashes() consumes, so the layout's own call further out finds nothing and does not draw it twice. */ @endphp
@partial('flash')
{{ t_raw('deals_page.eyebrow') }}

{{ t_raw('deals_page.title') }}

{{ t_raw('deals_page.sub') }}

@if ($deals)
@foreach ($deals as $d)
{!! $d['type'] === 'percent' ? t('common.deal_percent_off', [':n' => rtrim(rtrim(number_format((float) $d['value'], 2), '0'), '.')]) : t('common.deal_amount_off', [':amount' => money($d['value'])]) !!}

{{ $d['title'] }}

@if (!empty($d['restaurant_name']))

{{ $d['restaurant_name'] }}

@else

{{ t_raw('deals_page.valid_all_restaurants') }}

@endif

{{ $d['description'] }}

{{ t_raw('header.order_now') }}
@if ((float) $d['min_order'] > 0)

{{ t_raw('deals_page.min_order_text', [':amount' => money($d['min_order'])]) }}

@endif
@endforeach
@else

{{ t_raw('deals_page.empty_text') }}

@endif
@endsection