@props([
'active' => false,
'activeChildItems' => false,
'activeIcon' => null,
'badge' => null,
'badgeColor' => null,
'badgeTooltip' => null,
'childItems' => [],
'first' => false,
'grouped' => false,
'icon' => null,
'last' => false,
'shouldOpenUrlInNewTab' => false,
'sidebarCollapsible' => true,
'subGrouped' => false,
'url',
])
@php
$sidebarCollapsible = $sidebarCollapsible && filament()->isSidebarCollapsibleOnDesktop();
@endphp
class([
'fi-sidebar-item',
// @deprecated `fi-sidebar-item-active` has been replaced by `fi-active`.
'fi-active fi-sidebar-item-active' => $active,
'flex flex-col gap-y-1' => $active || $activeChildItems,
])
}}
>
filled($url),
'bg-gray-100 dark:bg-white/5' => $active,
])
>
@if (filled($icon) && ((! $subGrouped) || $sidebarCollapsible))
! $active,
'text-primary-600 dark:text-primary-400' => $active,
])
/>
@endif
@if ((blank($icon) && $grouped) || $subGrouped)
@endif
! $active,
'text-primary-600 dark:text-primary-400' => $active,
])
>
{{ $slot }}
@if (filled($badge))
{{ $badge }}
@endif
@if (($active || $activeChildItems) && $childItems)
@endif