@php /** @var array $r restaurant row (optionally with cuisine_name) */ $cuisine = $r['cuisine_name'] ?? ''; $rid = (int) $r['id']; $fav = can_favorite() && is_favorite($rid); $deal = restaurant_deal_label($rid); $rate = (float) $r['rating_cache']; $rateClass = $rate >= 4.5 ? 'is-great' : ($rate >= 4 ? 'is-good' : ($rate >= 3 ? 'is-ok' : 'is-low')); // Real dietary/attribute icons aggregated from this restaurant's menu (dynamic). $diet = restaurant_diet_icons($rid); $dietLabels = [ '004-leaf' => t_raw('common.diet_vegetarian_options'), '006-chili' => t_raw('common.diet_spicy_dishes'), '005-chef' => t_raw('common.diet_chefs_picks'), '008-protein' => t_raw('common.diet_egg_dishes'), '009-lemon' => t_raw('common.diet_zesty_dishes'), ]; @endphp
@if (can_favorite())
@csrf
@endif
{{ $r['name'] }}
@if ($deal){{ $deal }}@endif @if (!empty($r['loyalty_enabled'])){{ t_raw('common.rewards_badge') }}@endif
@if (!empty($r['is_featured']))
{{ t_raw('common.featured_badge') }}
@endif @php // Food-type tags ride the lower edge of the photo (like the Featured badge // above it) and fade in on hover; each keeps its own fixed colour. @endphp @php $tagNames = array_filter(array_map('trim', explode(',', (string) ($r['tag_names'] ?? '')))); @endphp @if ($tagNames)
@php $tagTaken = []; @endphp @foreach (array_slice($tagNames, 0, 3) as $tn){{ $tn }}@endforeach
@endif

{{ $r['name'] }}

{{ number_format($rate, 1) }}
@php // `distance` is present only where the card was drawn from a MEASURED search — // the nearby rail on a restaurant's page. Everywhere else the key is absent and // this line reads exactly as it always has. @endphp

{!! $cuisine !== '' ? e($cuisine) : t('common.multi_cuisine') !!}{!! !empty($r['city']) ? ' · ' . e($r['city']) : '' !!}{!! !empty($r['distance']) ? ' · ' . e((string) $r['distance']) : '' !!}

{{ (int) $r['avg_prep_time'] }} {{ t_raw('common.prep_min_suffix') }} {{ money($r['min_order']) }} {{ t_raw('common.order_min_suffix') }} · {!! (float) $r['delivery_fee'] > 0 ? money($r['delivery_fee']) . ' ' . t('common.delivery') : t('home.hero.s3_chip_free') !!} {{ t_raw('common.pickup') }} · {{ money($r['min_order']) }} {{ t_raw('common.order_min_suffix') }}
@partial('cards/stars', ['rate' => $rate]) @if ((int) ($r['rating_count'] ?? 0) > 0){{ number_format((int) $r['rating_count']) }} {{ t_raw('common.ratings_count_suffix') }}@endif
@if ($diet)
@foreach ($diet as $ic) @php $lbl = $dietLabels[$ic] ?? ''; @endphp@endforeach
@endif