@php $showSearch = isset($searchUrl) && $searchUrl !== null && $searchUrl !== '#'; $gridCols = match (true) { ! empty($centerCompose) => $showSearch ? 'grid-cols-5' : 'grid-cols-4', default => $showSearch ? 'grid-cols-4' : 'grid-cols-3', }; $avatarUrl = $avatarUrl ?? null; $initials = $initials ?? 'U'; $notificationsUrl = $notificationsUrl ?? '#'; $unreadUrl = $unreadUrl ?? null; $profileUrl = $profileUrl ?? '#'; $profileName = trim((string) ($profileName ?? '')); $profileSubtitle = trim((string) ($profileSubtitle ?? '')); $profileMenuItems = $profileMenuItems ?? []; if ($profileMenuItems === [] && $profileUrl !== '#') { $profileMenuItems = [['type' => 'link', 'label' => 'Profile', 'href' => $profileUrl]]; } $navActive = fn (bool $active) => $active ? 'text-indigo-600' : 'text-slate-600'; @endphp
{{-- Profile menu bottom sheet (matches desktop avatar dropdown) --}}
@if ($profileName !== '' || $profileSubtitle !== '')
@if ($avatarUrl) @else {{ $initials }} @endif
@if ($profileName !== '')

{{ $profileName }}

@endif @if ($profileSubtitle !== '')

{{ $profileSubtitle }}

@endif
@endif @include('partials.user-profile-menu', [ 'items' => $profileMenuItems, 'variant' => 'sheet', 'onNavigate' => 'profileOpen = false', ])