<div class="offcanvas offcanvas-end" tabindex="-1" id="offcanvasAddDesaKelurahan" aria-labelledby="offcanvasAddDesaKelurahanLabel">
    <div class="offcanvas-header border-bottom">
        <h5 id="offcanvasAddDesaKelurahanLabel" class="offcanvas-title">Tambah 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 class="add-new-desakelurahan pt-0" id="addNewDesaKelurahanForm" action="{{ route('desakelurahan.store') }}" method="POST">
            @csrf
            <div class="mb-4">
                <label class="form-label" for="add-adat-provinsi">Provinsi</label>
                <select id="add-adat-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="add-adat-kabupaten">Kabupaten/Kota</label>
                <select id="add-adat-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="add-adat-kecamatan">Kecamatan</label>
                <select id="add-adat-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="add-desa-code">Kode Desa/Kelurahan<span class="text-danger">*</span></label>
                <input type="text" class="form-control" id="add-desa-code" placeholder="1101012001" 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="add-desa-name">Nama Desa/Kelurahan<span class="text-danger">*</span></label>
                <input type="text" class="form-control" id="add-desa-name" placeholder="Desa Suka Maju" name="nama" />
            </div>

            <div class="mb-6 form-control-validation">
                <label class="form-label" for="add-desa-path">Path (Koordinat)</label>
                <textarea class="form-control" id="add-desa-path" placeholder="[3.21, 97.21]" name="path" rows="3"></textarea>
            </div>

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