@extends('layouts.teacher')
@section('title', 'New Announcement')
@section('content')
    <x-page-head title="New Announcement" />
    <x-panel><form method="POST" action="{{ route('teacher.announcements.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">Audience</label><select class="select w-full" name="audience"><option value="class">Class</option><option value="students">Students</option><option value="parents">Parents</option><option value="all">Whole school</option></select></div>
            <div class="form-group"><label class="form-label">Class</label><select class="select w-full" name="class_id"><option value="">—</option>@foreach($classes as $c)<option value="{{ $c->id }}">{{ $c->name }}</option>@endforeach</select></div>
            <div class="form-group"><label class="form-label">Priority</label><select class="select w-full" name="priority"><option value="normal">Normal</option><option value="high">High</option><option value="urgent">Urgent</option></select></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">Publish now</option></select></div>
            <div class="form-group" style="grid-column:1/-1;"><label class="form-label">Message</label><textarea class="input" name="body" rows="6" required></textarea></div>
        </div>
        <button class="btn btn-primary" style="margin-top:16px;">Save Announcement</button>
    </form></x-panel>
@endsection
