@php /** @var \App\Models\MenuItem $item */ @endphp
<li class="list-group-item d-flex align-items-center @if(($depth ?? 0) > 0) ms-4 @endif"
    data-item-id="{{ $item->id }}"
    data-parent-id="{{ $item->parent_id ?? '' }}"
    data-link-type="{{ $item->link_type }}"
    data-link-target='@json($item->link_target)'
    data-icon="{{ $item->icon }}"
    data-target-blank="{{ $item->target_blank ? '1' : '0' }}"
    data-visible-when="{{ $item->visible_when ?? 'always' }}"
    data-is-mega="{{ $item->is_mega ? '1' : '0' }}"
    data-mega-columns="{{ $item->mega_columns }}">
    <span class="drag-handle me-2 text-muted" style="cursor: grab;">⋮⋮</span>
    @if(! empty($item->icon))<i class="{{ $item->icon }} me-2"></i>@endif
    <span class="flex-grow-1">{{ $item->getTranslation('label', app()->getLocale()) ?: '(no label)' }}</span>
    <small class="text-muted me-2"><code>{{ $item->link_type }}</code></small>
    <button type="button" class="btn btn-sm btn-outline-secondary me-1" data-action="indent" title="↳">→</button>
    <button type="button" class="btn btn-sm btn-outline-secondary me-1" data-action="outdent" title="↰">←</button>
    <button type="button" class="btn btn-sm btn-outline-primary me-1" data-action="edit" title="Edit"><i class="fas fa-edit"></i></button>
    <button type="button" class="btn btn-sm btn-outline-danger" data-action="delete" title="Delete"><i class="fas fa-trash"></i></button>
</li>
