@extends('layouts.app')

@section('page_title', 'Add Notification')

@section('content')
    <div class="card">
        <div class="card-header">
            <h5 class="mb-0 fw-bold text-dark">Add New Notification</h5>
        </div>
        <div class="card-body">
            @if (session('error'))
                <div class="alert alert-danger alert-dismissible fade show" role="alert">
                    {{ session('error') }}
                    <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
                </div>
            @endif
            <form action="{{ route('notification.store') }}" method="POST">
                @csrf
                <div class="mb-3">
                    <label for="subject" class="form-label">Subject</label>
                    <input type="text" class="form-control" id="subject" name="subject" required>
                </div>
                <div class="mb-3">
                    <label for="description" class="form-label">Description</label>
                    <textarea class="form-control" id="description" name="description" rows="3" required></textarea>
                </div>
                <div class="mb-3">
                    <label for="schedule" class="form-label">Schedule (optional)</label>
                    <input type="datetime-local" class="form-control" id="schedule" name="schedule">
                </div>
                <div class="mb-3">
                    <label for="expiration" class="form-label">Expiration (optional)</label>
                    <input type="datetime-local" class="form-control" id="expiration" name="expiration">
                </div>
                <button type="submit" class="btn btn-primary">Save</button>
                <a href="{{ route('notification') }}" class="btn btn-secondary">Cancel</a>
            </form>
        </div>
    </div>
@endsection