<div class="offcanvas offcanvas-end" tabindex="-1" id="offcanvasAddKabupatenKota" aria-labelledby="offcanvasAddKabupatenKotaLabel">
    <div class="offcanvas-header border-bottom">
        <h5 id="offcanvasAddKabupatenKotaLabel" class="offcanvas-title">Tambah 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 class="add-new-kabupatenkota pt-0" id="addNewKabupatenKotaForm" action="{{ route('kabupatenkota.store') }}" method="POST">
            @csrf
            
            <div class="mb-6 form-control-validation">
                <label class="form-label" for="add-kab-provinsi">Provinsi<span class="text-danger">*</span></label>
                <select id="add-kab-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="add-kab-code">Kode Kabupaten/Kota<span class="text-danger">*</span></label>
                <input
                    type="text"
                    class="form-control"
                    id="add-kab-code"
                    placeholder="1101"
                    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="add-kab-name">Nama Kabupaten/Kota<span class="text-danger">*</span></label>
                <input
                    type="text"
                    class="form-control"
                    id="add-kab-name"
                    placeholder="Kab. Aceh Selatan"
                    name="nama" />
            </div>

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