@php $nodeLabel = $item->label ?: ($item->label_key ? __($item->label_key) : ($item->type === 'section' ? __('ui.admin_navigation_type_section') : $item->key)); $nodeChildren = $children->get((string) $item->id, collect()); $editablePayload = [ 'id' => $item->id, 'parent_id' => $item->parent_id, 'type' => $item->type, 'key' => $item->key, 'label_key' => $item->label_key, 'label' => $item->label, 'icon' => $item->icon, 'route_name' => $item->route_name, 'url' => $item->url, 'access' => $item->access, 'is_enabled' => $item->is_enabled, 'desktop_visible' => $item->desktop_visible, 'mobile_visible' => $item->mobile_visible, 'pinnable' => $item->pinnable, 'wide' => $item->wide, 'open_new_tab' => $item->open_new_tab, 'active_patterns' => implode(', ', (array) data_get($item->options, 'active', [])), ]; @endphp
{{ $nodeLabel }} {{ __('ui.admin_navigation_type_'.$item->type) }} @if($item->route_name) · {{ $item->route_name }} @elseif($item->url) · {{ \Illuminate\Support\Str::limit($item->url, 42) }} @endif
@if(!$item->is_enabled){{ __('ui.admin_navigation_disabled') }}@endif @if($item->access !== 'all'){{ $item->access }}@endif @if($item->desktop_visible)Desktop@endif @if($item->mobile_visible)Mobile@endif
@csrf @method('DELETE')
@if(in_array($item->type, ['category', 'section'], true))
@foreach($nodeChildren as $child) @include('admin.navigation._tree_item', ['item' => $child, 'children' => $children, 'availableIcons' => $availableIcons]) @endforeach
{{ $item->type === 'category' ? __('ui.admin_navigation_drop_category') : __('ui.admin_navigation_drop_section') }}
@endif