@props([ 'tabs' => [], 'initial' => null, ]) @php $normalized = collect($tabs) ->map(fn ($tab) => [ 'key' => (string) ($tab['key'] ?? ''), 'label' => (string) ($tab['label'] ?? ''), ]) ->filter(fn ($tab) => $tab['key'] !== '' && $tab['label'] !== '') ->values(); $initial = $initial ?? ($normalized->first()['key'] ?? ''); @endphp @if ($normalized->isNotEmpty())