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

{{ t_raw('account.my_favorites_title') }}

@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')
@partial('account-nav')

{{ t_raw('account.saved_restaurants_title') }}

@if ($restaurants->isNotEmpty()) @php /* `data-fav-list` tells the shared heart handler that on THIS page an un-favourited card must leave, not just go grey. Everywhere else the card stays and only the heart changes, which is right for a listing — but this page IS the list of favourites, so a grey heart sitting under the heading "Saved restaurants" contradicts itself until you reload. */ @endphp
@foreach ($restaurants as $r)
@partial('cards/restaurant', ['r' => $r])
@endforeach
@endif @php // Rendered always, hidden while cards remain, so removing the last one has // something to reveal without a round trip. @endphp
isNotEmpty() ? ' hidden' : '' }}>

{{ t_raw('account.no_favorites_empty') }}

{{ t_raw('restaurant.browse') }}
@endsection