<x-app-layout>
    <x-slot name="header">
        <h2 class="font-semibold text-xl text-gray-800 leading-tight">
            {{ __('Edit alumni') }}
        </h2>
    </x-slot>

    <div class="py-12">
        <div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
            <div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
                <div class="p-6">



    <div class="card max-w-xl mx-auto p-6">
        <h2 class="text-xl font-bold text-primary mb-4">Edit Alumni</h2>
        <form action="{{ route('alumnis.update', $alumni) }}" method="POST">
            @csrf
            @method('PUT')
            <div class="mb-3">
                <label class="font-semibold">Nama Santri</label>
                <input type="text" name="nama_santri" class="form-control rounded" value="{{ old('nama_santri', $alumni->nama_santri) }}" required>
                @error('nama_santri')<div class="text-red-600 text-sm mt-1">{{ $message }}</div>@enderror
            </div>
            <div class="mb-3">
                <label class="font-semibold">Tahun Lulus</label>
                <input type="number" name="tahun_lulus" class="form-control rounded" value="{{ old('tahun_lulus', $alumni->tahun_lulus) }}" required min="2000" max="{{ date('Y') }}">
                @error('tahun_lulus')<div class="text-red-600 text-sm mt-1">{{ $message }}</div>@enderror
            </div>
            <div class="mb-3">
                <label class="font-semibold">Aktivitas Setelah Lulus</label>
                <input type="text" name="aktivitas_setelah_lulus" class="form-control rounded" value="{{ old('aktivitas_setelah_lulus', $alumni->aktivitas_setelah_lulus) }}" required>
                @error('aktivitas_setelah_lulus')<div class="text-red-600 text-sm mt-1">{{ $message }}</div>@enderror
            </div>
            <div class="mb-3">
                <label class="font-semibold">Kontak</label>
                <input type="text" name="kontak" class="form-control rounded" value="{{ old('kontak', $alumni->kontak) }}">
                @error('kontak')<div class="text-red-600 text-sm mt-1">{{ $message }}</div>@enderror
            </div>
            <div class="mb-3">
                <label class="font-semibold">Keterangan</label>
                <input type="text" name="keterangan" class="form-control rounded" value="{{ old('keterangan', $alumni->keterangan) }}">
                @error('keterangan')<div class="text-red-600 text-sm mt-1">{{ $message }}</div>@enderror
            </div>
            <div class="flex gap-2 mt-4">
                <button type="submit" class="btn-primary">Update</button>
                <a href="{{ route('alumnis.index') }}" class="btn-accent">Batal</a>
            </div>
        </form>
    
            
</x-app-layout> 
