@extends('layouts.teacher')
@section('title', 'Create Quiz')
@section('content')
    <x-page-head title="Create Quiz" subtitle="Set up an online quiz" />
    <x-panel><form method="POST" action="{{ route('teacher.quizzes.store') }}">@csrf
        <div class="form-grid-2">
            <div class="form-group"><label class="form-label">Title</label><input class="input" name="title" required></div>
            <div class="form-group"><label class="form-label">Class</label><select class="select w-full" name="class_id" required>@foreach($classes as $c)<option value="{{ $c->id }}">{{ $c->name }}</option>@endforeach</select></div>
            <div class="form-group"><label class="form-label">Subject</label><select class="select w-full" name="subject_id" required>@foreach($subjects as $s)<option value="{{ $s->id }}">{{ $s->name }}</option>@endforeach</select></div>
            <div class="form-group"><label class="form-label">Duration (minutes)</label><input class="input" type="number" name="duration_minutes"></div>
            <div class="form-group"><label class="form-label">Starts</label><input class="input" type="datetime-local" name="starts_at"></div>
            <div class="form-group"><label class="form-label">Ends</label><input class="input" type="datetime-local" name="ends_at"></div>
            <div class="form-group"><label class="form-label">Status</label><select class="select w-full" name="status"><option value="draft">Draft</option><option value="published">Published</option></select></div>
            <div class="form-group" style="grid-column:1/-1;"><label class="form-label">Instructions</label><textarea class="input" name="instructions" rows="3"></textarea></div>
        </div>
        <button class="btn btn-primary" style="margin-top:16px;">Create & Add Questions</button>
    </form></x-panel>
@endsection
