@extends('layouts.app')
@section('title', 'Yeni Kullanıcı')
@section('content')
<form method="POST" action="{{ route('panel.users.store') }}" class="bg-white rounded shadow p-6 max-w-xl space-y-4">
    @csrf
    <div>
        <label class="block text-sm font-medium mb-1">Ad Soyad</label>
        <input type="text" name="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" required class="w-full border rounded px-3 py-2">
    </div>
    <div>
        <label class="block text-sm font-medium mb-1">Şifre</label>
        <input type="password" name="password" required class="w-full border rounded px-3 py-2">
    </div>
    <div>
        <label class="block text-sm font-medium mb-1">Rol</label>
        <select name="role" class="w-full border rounded px-3 py-2">
            @foreach ($roles as $role)
                <option value="{{ $role->name }}">{{ $role->name }}</option>
            @endforeach
        </select>
    </div>
    <button class="bg-blue-600 text-white rounded px-4 py-2 text-sm font-medium">Kaydet</button>
</form>
@endsection
