@php $u = auth()->user(); $bellTones = [ 'success' => 'bg-emerald-100 text-emerald-700 dark:bg-emerald-900/40 dark:text-emerald-300', 'warning' => 'bg-amber-100 text-amber-700 dark:bg-amber-900/40 dark:text-amber-300', 'error' => 'bg-rose-100 text-rose-700 dark:bg-rose-900/40 dark:text-rose-300', 'info' => 'bg-brand-100 text-brand-700 dark:bg-brand-900/40 dark:text-brand-300', ]; $bellItems = $u ? $u->notifications()->take(8)->get() : collect(); $bellRows = $bellItems->map(function ($n) use ($bellTones) { $level = $n->data['level'] ?? 'info'; return [ 'n' => $n, 'tone' => $bellTones[$level] ?? $bellTones['info'], 'icon' => $n->data['icon'] ?? 'bell', 'href' => $n->data['url'] ?? route('notifications.index'), 'title' => $n->data['title'] ?? __('Notification'), 'msg' => $n->data['message'] ?? '', ]; }); @endphp @if(session()->has('impersonating_tenant_id'))
{{ __('Impersonating') }}: {{ optional(\App\Models\Tenant::find(session('impersonating_tenant_id')))->name }}
@csrf
@elseif(session()->has('tenant_impersonator_id'))
{{ __('Impersonating') }}: {{ auth()->user()?->name }} ({{ auth()->user()?->email }})
@csrf
@endif
{{-- Mobile sidebar toggle --}}

@yield('page-title', 'Dashboard')

{{-- Language switcher --}} @include('partials.lang-switcher') {{-- Theme toggle --}} {{-- Notifications bell --}}
{{-- User menu --}}