<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-lg modal-dialog modal-dialog-centered">
        <div class="modal-content radius-16 bg-base">
            <div class="modal-header py-16 px-24 border border-top-0 border-start-0 border-end-0">
                <h1 class="modal-title fs-5" id="exampleModalLabel">Buat Penjadwalan</h1>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="modal-body p-24">
                <form action="{{ route('jadwal.create') }}" method="POST">
                    @csrf
                    <div class="row">
                        <div class="col-12 mb-20">
                            <label class="form-label fw-semibold text-primary-light text-sm mb-8">Perusahaan</label>
                            <select name="perusahaan_id" class="form-select radius-8 select2" style="width: 100%" required>
                                <option value="" disabled selected>Pilih Perusahaan</option>
                                @foreach(($perusahaan ?? []) as $p)
                                    <option value="{{ $p->PerusahaanID }}">{{ $p->NamaPerusahaan }}</option>
                                @endforeach
                            </select>
                        </div>
                        <div class="col-12 mb-20">
                            <label class="form-label fw-semibold text-primary-light text-sm mb-8">Nama Kegiatan</label>
                            <input type="text" name="title" class="form-control radius-8" placeholder="Masukkan Nama Kegiatan" required>
                        </div>
                        <div class="col-md-6 mb-20">
                            <label for="startDate" class="form-label fw-semibold text-primary-light text-sm mb-8">Mulai Tanggal</label>
                            <div class="position-relative">
                                <input class="form-control radius-8 bg-base" id="startDate" name="start_date" type="text" placeholder="03/12/2024, 10:30 AM" required>
                                <span class="position-absolute end-0 top-50 translate-middle-y me-12 line-height-1">
                                    <iconify-icon icon="solar:calendar-linear" class="icon text-lg"></iconify-icon>
                                </span>
                            </div>
                        </div>
                        <div class="col-md-6 mb-20">
                            <label for="endDate" class="form-label fw-semibold text-primary-light text-sm mb-8">Sampai Tanggal </label>
                            <div class="position-relative">
                                <input class="form-control radius-8 bg-base" id="endDate" name="end_date" type="text" placeholder="03/12/2024, 2:30 PM" required>
                                <span class="position-absolute end-0 top-50 translate-middle-y me-12 line-height-1">
                                    <iconify-icon icon="solar:calendar-linear" class="icon text-lg"></iconify-icon>
                                </span>
                            </div>
                        </div>
                        <div class="col-12 mb-20">
                            <label class="form-label fw-semibold text-primary-light text-sm mb-8">Jenis Perizinan</label>
                            <div class="position-relative">
                                <select name="document_type" class="form-select radius-8" required>
                                    <option value="" disabled selected>Pilih Jenis Dokumen</option>
                                    @php $listTypes = ($dokumenTypes ?? null) && count($dokumenTypes) ? $dokumenTypes->pluck('Kode','Kode')->keys()->toArray() : ['amdal','pertek','andal_rkl_rpl','addendum','dplh','delh','ukl_upl']; @endphp
                                    @foreach($listTypes as $kode)
                                        <option value="{{ $kode }}">{{ strtoupper(str_replace('_',' ', $kode)) }}</option>
                                    @endforeach
                                </select>
                            </div>
                        </div>

                        <div class="col-12 mb-20">
                            <label for="desc" class="form-label fw-semibold text-primary-light text-sm mb-8">Keterangan</label>
                            <textarea class="form-control" id="desc" name="description" rows="4" cols="50" placeholder="Masukkan keterangan"></textarea>
                        </div>

                        <div class="d-flex align-items-center justify-content-center gap-3 mt-24">
                            <button type="reset" class="border border-danger-600 bg-hover-danger-200 text-danger-600 text-md px-40 py-11 radius-8">
                                Batalkan
                            </button>
                            <button type="submit" class="btn btn-primary border border-primary-600 text-md px-24 py-12 radius-8">
                                Simpan
                            </button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
