@extends('layouts.app')

@section('content')
    <x-card>
        <div class="mb-6">
            <h2 class="text-2xl font-semibold text-slate-900">Tambah Waiter</h2>
            <p class="text-sm text-slate-500">Lengkapi data waiter baru.</p>
        </div>
        <form method="post" action="{{ route('waiters.store') }}" class="grid gap-4 md:grid-cols-2">
            @csrf
            <x-input name="nama" label="Nama" required />
            <x-input name="mulai_bekerja" label="Mulai Bekerja" type="date" />

            <div class="md:col-span-2">
                <label class="inline-flex items-center gap-2 text-sm font-semibold text-slate-700">
                    <input type="checkbox" name="is_active" value="1" class="rounded border-slate-300" {{ old('is_active', true) ? 'checked' : '' }}>
                    Aktif
                </label>
            </div>

            <div class="flex gap-3 md:col-span-2">
                <x-button type="submit">Simpan</x-button>
                <x-button href="{{ route('waiters.index') }}" variant="secondary">Kembali</x-button>
            </div>
        </form>
    </x-card>
@endsection
