<div class="offcanvas offcanvas-end" tabindex="-1" id="offcanvasEditDesaKelurahan" aria-labelledby="offcanvasEditDesaKelurahanLabel">
    <div class="offcanvas-header border-bottom">
        <h5 id="offcanvasEditDesaKelurahanLabel" class="offcanvas-title">Edit Desa/Kelurahan</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="editDesaKelurahanForm" class="pt-0">
            @csrf
            <input type="hidden" id="edit-desa-id" name="id">
            
            <div class="mb-4">
                <label class="form-label" for="edit-desa-provinsi">Provinsi<span class="text-danger">*</span></label>
                <select id="edit-desa-provinsi" 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-4">
                <label class="form-label" for="edit-desa-kabupaten">Kabupaten/Kota<span class="text-danger">*</span></label>
                <select id="edit-desa-kabupaten" class="select2 form-select" data-placeholder="Pilih Kabupaten/Kota" disabled>
                    <option value="">Pilih Kabupaten/Kota</option>
                </select>
            </div>

            <div class="mb-4">
                <label class="form-label" for="edit-desa-kecamatan">Kecamatan<span class="text-danger">*</span></label>
                <select id="edit-desa-kecamatan" name="kecamatan_id" class="select2 form-select" data-placeholder="Pilih Kecamatan" disabled>
                    <option value="">Pilih Kecamatan</option>
                </select>
            </div>

            <div class="mb-6 form-control-validation">
                <label class="form-label" for="edit-desa-code">Kode Desa/Kelurahan<span class="text-danger">*</span></label>
                <input type="text" class="form-control" id="edit-desa-code" name="kode" maxlength="10" 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-desa-name">Nama Desa/Kelurahan<span class="text-danger">*</span></label>
                <input type="text" class="form-control" id="edit-desa-name" name="nama" />
            </div>

            <div class="mb-6 form-control-validation">
                <label class="form-label" for="edit-desa-path">Path (Koordinat)</label>
                <textarea class="form-control" id="edit-desa-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>