@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