{{-- brafa Systems — topbar. Mirror of prototype/admin/shell.jsx → Topbar component. Hard constraints kept from the previous implementation: • Mobile sidenav toggle preserves id="iconNavbarSidenav" so Material Dashboard's bundled JS can still pin/unpin the body sidenav class. • livewire:notification-dropdown is still rendered. Its Blade markup was restructured to fit the new bell pill — every wire:click and property reference is preserved. • Logout form keeps its existing GET → route('logout') behavior. --}} @if (Auth::check()) @php $routeName = Route::currentRouteName(); $brafaTitle = $routeName ? str_replace(['.', '-'], ' ', $routeName) : ''; /* Short eyebrow above the title — gives the section context. */ $brafaSection = match (true) { in_array($routeName, ['user-profile']) => 'Account', in_array($routeName, ['ajax.dashboard', 'port.map', 'notes-kanban', 'superadmin.parka-tokens']) => 'More', default => 'Manage', }; $authUserName = Auth::user()->name; $authUserPicture = Auth::user()->picture ? asset('storage/' . Auth::user()->picture) : null; $authUserInitials = collect(explode(' ', trim((string) $authUserName))) ->filter() ->take(2) ->map(fn ($p) => strtoupper(mb_substr($p, 0, 1))) ->implode(''); @endphp {{-- No id="navbarBlur" / data-scroll: those make Material Dashboard's blur-on-scroll JS hook and mutate the topbar on scroll (and on the page jumps that tab clicks cause). The per-page scroll scripts that referenced #navbarBlur are null-guarded, so the topbar stays put. --}}
{{-- Mobile sidenav toggle — id MUST stay "iconNavbarSidenav" so the bundled material-dashboard.min.js continues to toggle the body class. --}} {{-- Back arrow --}} {{-- Eyebrow + title --}}
{{ $brafaSection }}

{{ $brafaTitle }}

{{-- Right cluster: notifications + user pill --}}
@if ($authUserPicture) {{ $authUserName }} @else
{{ $authUserInitials ?: '?' }}
@endif {{ $authUserName }}
@csrf
@endif