<div class="offcanvas offcanvas-end" tabindex="-1" id="offcanvasEditKabupatenKota" aria-labelledby="offcanvasEditKabupatenKotaLabel">
    <div class="offcanvas-header border-bottom">
        <h5 id="offcanvasEditKabupatenKotaLabel" class="offcanvas-title">Edit Kabupaten/Kota</h5>
        <button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="Close"></button>
    </div>
    
    <div class="offcanvas-body mx-0 flex-grow-0 p-6 h-100">
        <form id="editKabupatenKotaForm" class="pt-0">
            @csrf
            <input type="hidden" id="edit-kabupatenkota-id" name="id">
            
            <div class="mb-6 form-control-validation">
                <label class="form-label" for="edit-kabupatenkota-provinsi">Provinsi<span class="text-danger">*</span></label>
                <select id="edit-kabupatenkota-provinsi" name="provinsi_id" class="select2 form-select" data-placeholder="Pilih Provinsi">
                    <option value="">Pilih Provinsi</option>
                    @foreach($provinsi as $prov)
                        <option value="{{ $prov->id }}">{{ $prov->nama }}</option>
                    @endforeach
                </select>
            </div>

            <div class="mb-6 form-control-validation">
                <label class="form-label" for="edit-kabupatenkota-kode">Kode Kabupaten/Kota<span class="text-danger">*</span></label>
                <input
                    type="text"
                    class="form-control"
                    id="edit-kabupatenkota-kode"
                    name="kode"
                    maxlength="4"
                    inputmode="numeric"
                    pattern="[0-9]*"
                    oninput="this.value = this.value.replace(/[^0-9]/g, '')" />
            </div>

            <div class="mb-6 form-control-validation">
                <label class="form-label" for="edit-kabupatenkota-nama">Nama Kabupaten/Kota<span class="text-danger">*</span></label>
                <input
                    type="text"
                    class="form-control"
                    id="edit-kabupatenkota-nama"
                    name="nama" />
            </div>

            <div class="mb-6 form-control-validation">
                <label class="form-label" for="edit-kabupatenkota-path">Path (Koordinat)</label>
                <textarea class="form-control" id="edit-kabupatenkota-path" name="path" rows="3"></textarea>
            </div>

            <div class="mt-8">
                <button type="submit" class="btn btn-primary me-3">Update Data</button>
                <button type="reset" class="btn btn-label-danger" data-bs-dismiss="offcanvas">Cancel</button>
            </div>
        </form>
    </div>
</div>