@php use Filament\Schemas\Components\Tabs\Tab; $activeTab = $getActiveTab(); $isContained = $isContained(); $isVertical = $isVertical(); $label = $getLabel(); $livewireProperty = $getLivewireProperty(); $renderHookScopes = $getRenderHookScopes(); $id = $getId(); @endphp @if (blank($livewireProperty))
merge([ 'id' => $id, 'wire:key' => $getLivewireKey() . '.container', ], escape: false) ->merge($getExtraAttributes(), escape: false) ->merge($getExtraAlpineAttributes(), escape: false) ->class([ 'fi-sc-tabs', 'fi-contained' => $isContained, 'fi-vertical' => $isVertical, ]) }} > @foreach ($getStartRenderHooks() as $startRenderHook) {{ \Filament\Support\Facades\FilamentView::renderHook($startRenderHook, scopes: $renderHookScopes) }} @endforeach @foreach ($getChildSchema()->getComponents() as $tab) @php $tabKey = $tab->getKey(isAbsolute: false); $tabBadge = $tab->getBadge(); $tabBadgeColor = $tab->getBadgeColor(); $tabBadgeIcon = $tab->getBadgeIcon(); $tabBadgeIconPosition = $tab->getBadgeIconPosition(); $tabBadgeTooltip = $tab->getBadgeTooltip(); $tabIcon = $tab->getIcon(); $tabIconPosition = $tab->getIconPosition(); $tabExtraAttributeBag = $tab->getExtraAttributeBag(); $tabHiddenJs = $tab->getHiddenJs(); $tabVisibleJs = $tab->getVisibleJs(); $tabVisibilityJs = match ([filled($tabHiddenJs), filled($tabVisibleJs)]) { [true, true] => "(! ({$tabHiddenJs})) && ({$tabVisibleJs})", [true, false] => "! ({$tabHiddenJs})", [false, true] => $tabVisibleJs, default => null, }; @endphp {{ $tab->getLabel() }} @endforeach @foreach ($getEndRenderHooks() as $endRenderHook) {{ \Filament\Support\Facades\FilamentView::renderHook($endRenderHook, scopes: $renderHookScopes) }} @endforeach @foreach ($getChildSchema()->getComponents() as $tab) @php $tabHiddenJs = $tab->getHiddenJs(); $tabVisibleJs = $tab->getVisibleJs(); $tabVisibilityJs = match ([filled($tabHiddenJs), filled($tabVisibleJs)]) { [true, true] => "(! ({$tabHiddenJs})) && ({$tabVisibleJs})", [true, false] => "! ({$tabHiddenJs})", [false, true] => $tabVisibleJs, default => null, }; @endphp @if ($tabVisibilityJs)
{{ $tab }}
@else {{ $tab }} @endif @endforeach
@else @php $activeTab = strval($this->{$livewireProperty}); @endphp
merge([ 'id' => $id, 'wire:key' => $getLivewireKey() . '.container', ], escape: false) ->merge($getExtraAttributes(), escape: false) ->class([ 'fi-sc-tabs', 'fi-contained' => $isContained, 'fi-vertical' => $isVertical, ]) }} > @foreach ($getStartRenderHooks() as $startRenderHook) {{ \Filament\Support\Facades\FilamentView::renderHook($startRenderHook, scopes: $renderHookScopes) }} @endforeach @foreach ($getChildSchema()->getComponents(withOriginalKeys: true) as $tabKey => $tab) @php $tabBadge = $tab->getBadge(); $tabBadgeColor = $tab->getBadgeColor(); $tabBadgeIcon = $tab->getBadgeIcon(); $tabBadgeIconPosition = $tab->getBadgeIconPosition(); $tabBadgeTooltip = $tab->getBadgeTooltip(); $tabIcon = $tab->getIcon(); $tabIconPosition = $tab->getIconPosition(); $tabExtraAttributeBag = $tab->getExtraAttributeBag(); $tabKey = strval($tabKey); @endphp {{ $tab->getLabel() ?? $this->generateTabLabel($tabKey) }} @endforeach @foreach ($getEndRenderHooks() as $endRenderHook) {{ \Filament\Support\Facades\FilamentView::renderHook($endRenderHook, scopes: $renderHookScopes) }} @endforeach @foreach ($getChildSchema()->getComponents(withOriginalKeys: true) as $tabKey => $tab) {{ $tab->key($tabKey) }} @endforeach
@endif