@extends('layouts.app')

@section('content')
<!-- Background seluruh halaman -->
<div style="background-color: #e0e0e0; width: 100%; min-height: 100vh; border-radius: 15px; padding: 1rem;">

    <!-- Header -->
    <div style="background-color: #000; color: #fff; padding: 0.1rem; border-radius: 0.5rem;">
        <h1 class="m-0">Edit Jadwal Jumat</h1>
    </div>

    <!-- Konten utama -->
    <div class="container mt-4">
        <div class="card p-4 border border-secondary" style="border-radius: 15px; background-color: #fff;">
            <form action="{{ route('jadwal.update', $jadwal->id) }}" method="POST">
                @csrf
                @method('PUT')

                <div class="form-group mb-3">
                    <label><strong>Jumat</strong></label>
                    <select name="jumat" class="form-control" required>
                        @foreach(['Legi', 'Pon', 'Kliwon', 'Pahing', 'Wage','Cadangan'] as $hari)
                            <option value="{{ $hari }}" {{ $jadwal->jumat == $hari ? 'selected' : '' }}>{{ $hari }}</option>
                        @endforeach
                    </select>
                </div>

                <div class="form-group mb-3">
                    <label><strong>Khotib</strong></label>
                    <input type="text" name="khotib" class="form-control" value="{{ $jadwal->khotib }}" required>
                </div>

                <div class="form-group mb-3">
                    <label><strong>Bilal</strong></label>
                    <input type="text" name="bilal" class="form-control" value="{{ $jadwal->bilal }}" required>
                </div>

                <div class="form-group mb-4">
                    <label><strong>Muadzin</strong></label>
                    <input type="text" name="muadzin" class="form-control" value="{{ $jadwal->muadzin }}" required>
                </div>

                <div class="d-flex justify-content-between">
                    <a href="{{ route('jadwal.index') }}" class="btn btn-secondary">Kembali</a>
                    <button type="submit" class="btn btn-success">Update</button>
                </div>
            </form>
        </div>
    </div>
</div>
@endsection
