<div class="dropdown d-inline-block">
    <button data-bs-toggle="modal" data-bs-target="#edit-item-{{ $item->id }}" style="border: none; background:none;">
        <i class="ri-edit-box-fill" style="font-size: 20px;
        color: #0072ff;"></i>
    </button>
    {{-- <ul class="dropdown-menu dropdown-menu">
        <li>
            <a class="dropdown-item edit-item-btn" data-bs-toggle="modal" data-bs-target="#edit-item-{{ $item->id }}">
                <i class="ri-pencil-fill align-bottom me-2 text-muted"></i> {{ __('Edit') }}
            </a>
        </li>
    </ul> --}}
</div>


{{-- @can('update', $item) --}}
<!-- Edit Modal -->
<div class="modal fade" id="edit-item-{{ $item->id }}" tabindex="-1" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered">
        <div class="modal-content">
            <div class="modal-header bg-light p-3">
                <h5 class="modal-title" id="exampleModalLabel">{{ __('Update') }}</h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close" id="close-modal"></button>
            </div>
            <form action="{{ route('c-panel.menus.update', $item->id ) }}" method="POST" enctype="multipart/form-data">
                @csrf
                @method('PUT')
                <div class="modal-body">
                    <div class="mb-3">
                        <label for="name" class="form-label">{{ __('English Menu Name') }}</label>
                        <input type="text" id="name" name="name" value="{{ old('name', $item->name) }}" class="form-control" placeholder="Name" required />
                    </div>
                    <div class="mb-3">
                        <label for="name_ar" class="form-label">{{ __('Arabic Menu Name') }}</label>
                        <input type="text" id="name_ar" name="name_ar" value="{{ old('name_ar', $item->name_ar) }}" class="form-control" placeholder="Name" required />
                    </div>
                </div>
                <div class="modal-footer">
                    <div class="hstack gap-2 justify-content-end">
                        <button type="button" class="btn btn-light" data-bs-dismiss="modal">{{ __('Close') }}</button>
                        <button type="submit" class="btn btn-success" id="add-btn">{{ __('Update') }}</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<!--end edit modal -->
{{-- @endcan --}}
