@props([ 'navigation', ]) @foreach ($navigation as $navigationGroup) @if ($navigationGroupLabel = $navigationGroup->getLabel()) {{ $navigationGroupLabel }} @foreach ($navigationGroup->getItems() as $navigationItem) @php $navigationItemIcon = $navigationItem->getIcon(); $navigationItemIcon = $navigationItem->isActive() ? ($navigationItem->getActiveIcon() ?? $navigationItemIcon) : $navigationItemIcon; @endphp {{ $navigationItem->getLabel() }} @if ($navigationItemIcon instanceof \Illuminate\Contracts\Support\Htmlable) {{ $navigationItemIcon }} @endif @endforeach @else @foreach ($navigationGroup->getItems() as $navigationItem) @php $navigationItemIcon = $navigationItem->getIcon(); $navigationItemIcon = $navigationItem->isActive() ? ($navigationItem->getActiveIcon() ?? $navigationItemIcon) : $navigationItemIcon; @endphp {{ $navigationItem->getLabel() }} @if ($navigationItemIcon instanceof \Illuminate\Contracts\Support\Htmlable) {{ $navigationItemIcon }} @endif @endforeach @endif @endforeach