<!-- resources/views/quiz/create.blade.php -->

@extends('layouts/contentNavbarLayout')

@section('title', 'Edit Quiz')

@section('content')
<!-- Your existing content goes here -->
<h4 class="fw-bold py-3 mb-4">
    <span class="text-muted fw-light">Edit Quiz</span>
</h4>

<form action="{{ route('quiz.update', $quiz->id) }}" method="POST" enctype="multipart/form-data">
    @csrf
    <div class="card">
        <div class="card-header">
            Form Edit Data Quiz
        </div>
        <div class="card-body">
            <form>
                <div class="mb-3">
                    <label for="jenjang" class="form-label">Jenjang</label>
                    <select id="jenjang" class="select2 form-select" name="jenjang">
                        <option value="{{$quiz->jenjang}}" disabled selected>{{$quiz->jenjang}} (Select)</option>
                        <option value="Pre-Kids">Pre-Kids</option>
                        <option value="Beginner">Beginner</option>
                        <option value="Intermediate">Intermediate</option>
                    </select>
                </div>
                <div class="mb-3">
                    <label for="jenis" class="form-label">Jenis</label>
                    <select id="jenis" class="select2 form-select" name="jenis">
                        <option value="{{$quiz->jenis}}" disabled selected>{{$quiz->jenis}} (Select)</option>
                        <option value="Reading">Reading</option>
                        <option value="Writing">Writing</option>
                    </select>
                </div>
                <div class="mb-3">
                    <label for="soal" class="form-label">Soal</label>
                    <input type="text" class="form-control" id="soal" name="soal" value="{{$quiz->soal}}">
                </div>
                <div class="mb-3">
                    <label for="jawaban" class="form-label">Jawaban</label>
                    <input type="text" class="form-control" id="jawaban" name="jawaban" value="{{$quiz->jawaban}}">
                </div>
                <div class="mb-3">
                    <label for="jawaban_benar" class="form-label">Jawaban Benar</label>
                    <input type="text" class="form-control" id="jawaban_benar" name="jawaban_benar"
                        value="{{$quiz->jawaban_benar}}">
                </div>
                <button type="submit" class="btn btn-primary">Submit</button>
            </form>
        </div>
    </div>
    @endsection