@extends('layouts.app')

@section('content')
<div class="container mt-4">
    <h2>Edit Jadwal Bel</h2>

    <form action="{{ route('jadwal-bel.update', $jadwal->id) }}" method="POST">
        @csrf
        @method('PUT')

        <div class="form-group">
            <label for="hari">Hari</label>
            <select name="hari" class="form-control">
                @foreach(['Senin','Selasa','Rabu','Kamis','Jumat','Sabtu'] as $hari)
                <option value="{{ $hari }}" {{ $jadwal->hari == $hari ? 'selected' : '' }}>{{ $hari }}</option>
                @endforeach
            </select>
        </div>

        <div class="form-group mt-2">
            <label for="jam">Jam</label>
            <input type="time" name="jam" class="form-control" value="{{ $jadwal->jam }}" required>
        </div>

        <div class="form-group mt-2">
            <label for="keterangan">Keterangan</label>
            <input type="text" name="keterangan" class="form-control" value="{{ $jadwal->keterangan }}">
        </div>

        <div class="form-group mt-2">
            <label for="file_suara">File Suara</label>
            <input type="text" name="file_suara" class="form-control" value="{{ $jadwal->file_suara }}">
        </div>

        <button class="btn btn-success mt-3">Update</button>
        <a href="{{ route('jadwal-bel.index') }}" class="btn btn-secondary mt-3">Kembali</a>
    </form>
</div>
@endsection