<div class="modal fade" id="createSubkriteriaModal" tabindex="-1" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">Tambah Sub Kriteria Baru</h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <form action="{{ route('subkriteria.store') }}" method="POST">
                @csrf
                <div class="modal-body">
                    <div class="mb-3">
                        <label for="kriteria_id" class="form-label">Kriteria</label>
                        <select class="form-select" id="kriteria_id" name="kriteria_id" required>
                            <option value="">Pilih Kriteria</option>
                            @foreach($kriterias as $krit)
                                <option value="{{ $krit->id }}" 
                                    {{ isset($kriteria) && $krit->id == $kriteria->id ? 'selected' : '' }}>
                                    {{ $krit->nama_kriteria }}
                                </option>
                            @endforeach
                        </select>
                    </div>
                    <div class="mb-3">
                        <label for="nama_subkriteria" class="form-label">Nama Sub Kriteria</label>
                        <input type="text" class="form-control" id="nama_subkriteria" name="nama_subkriteria" required>
                    </div>
                    <div class="mb-3">
                        <label for="nilai" class="form-label">Nilai</label>
                        <input type="number" step="0.01" class="form-control" id="nilai" name="nilai" required>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Tutup</button>
                    <button type="submit" class="btn btn-primary">Simpan</button>
                </div>
            </form>
        </div>
    </div>
</div>