@extends('layouts.app')
@section('title', 'Admin Düzenle')
@section('content')
<form method="POST" action="{{ route('panel.admins.update', $admin) }}" class="bg-white rounded shadow p-6 max-w-xl space-y-4">
    @csrf
    @method('PUT')
    <div>
        <label class="block text-sm font-medium mb-1">Ad Soyad</label>
        <input type="text" name="name" value="{{ $admin->name }}" required class="w-full border rounded px-3 py-2">
    </div>
    <div>
        <label class="block text-sm font-medium mb-1">E-posta</label>
        <input type="email" name="email" value="{{ $admin->email }}" required class="w-full border rounded px-3 py-2">
    </div>
    <div>
        <label class="block text-sm font-medium mb-1">Şifre (değiştirmek için doldurun)</label>
        <input type="password" name="password" class="w-full border rounded px-3 py-2">
    </div>
    <div>
        <label class="block text-sm font-medium mb-1">Durum</label>
        <select name="status" class="w-full border rounded px-3 py-2">
            <option value="active" @selected($admin->status==='active')>Aktif</option>
            <option value="passive" @selected($admin->status==='passive')>Pasif</option>
        </select>
    </div>
    <button class="bg-blue-600 text-white rounded px-4 py-2 text-sm font-medium">Güncelle</button>
</form>
@endsection
