@extends('layouts.app')

@section('title', 'Edit Timetable Slot')

@section('content')
    <x-page-head title="Edit Timetable Slot" subtitle="Update schedule">
        <x-slot:actions><a href="{{ route('school.timetable.index') }}" class="btn btn-outline">Back</a></x-slot:actions>
    </x-page-head>
    <x-panel>
        <form method="POST" action="{{ route('school.timetable.update', $slot) }}">
            @csrf @method('PUT')
            @include('admin.timetable._form')
            <div style="display:flex; gap:10px; margin-top:16px;">
                <button type="submit" class="btn btn-primary">Update</button>
                <a href="{{ route('school.timetable.index') }}" class="btn btn-outline">Cancel</a>
            </div>
        </form>
        <form method="POST" action="{{ route('school.timetable.destroy', $slot) }}" style="margin-top:12px;" onsubmit="return confirm('Delete this slot?')">
            @csrf @method('DELETE')
            <button type="submit" class="btn btn-danger">Delete</button>
        </form>
    </x-panel>
@endsection
