@props([ 'title' => null, 'items' => [], 'uppercase' => true, ]) @php // Normalize items into consistent [ 'label' => '...', 'url' => '...' ] structure $normalizedItems = []; foreach ($items as $key => $value) { if (is_array($value)) { $normalizedItems[] = [ 'label' => $value['label'] ?? '', 'url' => $value['url'] ?? null, ]; } elseif (is_string($key)) { $normalizedItems[] = [ 'label' => $key, 'url' => $value, ]; } else { $normalizedItems[] = [ 'label' => (string) $value, 'url' => null, ]; } } // If no items passed but title is present, generate single trail item if (empty($normalizedItems) && $title) { $normalizedItems[] = [ 'label' => $title, 'url' => null, ]; } @endphp
merge(['class' => 'sticky -top-6 z-30 -mt-6 -mx-6 px-6 py-3 mb-6 bg-white/95 dark:bg-slate-800/95 backdrop-blur-xs border-b border-slate-200/80 dark:border-slate-800 select-none shadow-2xs']) }}>
@if($title)

{{ $title }}

@if(isset($left))
{{ $left }}
@endif
@elseif(isset($left))
{{ $left }}
@endif
@if(isset($right) || isset($actions) || !empty(trim((string)$slot)))
{{ $right ?? $actions ?? $slot }}
@endif