@extends('layouts.app')

@section('content')
<div class="container py-4">
    <div class="card shadow rounded-4">
        <div class="card-header bg-primary text-white rounded-top-4">
            <h4 class="mb-0">
                <i class="bi bi-pencil-square me-2"></i> Edit Data Kasus
            </h4>
        </div>
        <div class="card-body">
            <form action="{{ route('admin.kasus.update', $kasu->id) }}" method="POST">
                @csrf
                @method('PUT')

                <div class="mb-3">
                    <label for="bulan" class="form-label fw-semibold">Bulan</label>
                    <input type="text" name="bulan" id="bulan" class="form-control rounded-pill" 
                           value="{{ old('bulan', $kasu->bulan) }}" required>
                </div>

                <div class="mb-3">
                    <label for="jumlah_kasus" class="form-label fw-semibold">Jumlah Kasus</label>
                    <input type="number" name="jumlah_kasus" id="jumlah_kasus" class="form-control rounded-pill" 
                           value="{{ old('jumlah_kasus', $kasu->jumlah_kasus) }}" required>
                </div>

                <div class="mb-3">
                    <label for="tahun" class="form-label fw-semibold">Tahun</label>
                    <input type="number" name="tahun" id="tahun" class="form-control rounded-pill" 
                           value="{{ old('tahun', $kasu->tahun) }}" required>
                </div>

                <div class="d-flex justify-content-between">
                    <a href="{{ route('admin.kasus.index') }}" class="btn btn-outline-secondary rounded-pill">
                        <i class="bi bi-arrow-left me-1"></i> Kembali
                    </a>
                    <button type="submit" class="btn btn-success rounded-pill">
                        <i class="bi bi-save me-1"></i> Simpan Perubahan
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>
@endsection
