@extends('backend.layouts.app')

@section('title')
    Create ID Card Type - Hotel Management System
@endsection

@section('content')
    <!-- Breadcrumb -->
    <div class="bg-white shadow-sm border-b border-gray-200 px-6 py-4">
        <div class="flex items-center justify-between">
            <div class="flex items-center text-sm text-gray-600">
                <i class="fas fa-home mr-2"></i>
                <span>/ Staff Section / ID Card Types / Create</span>
            </div>
            <a href="{{ route('id-card-types.index') }}" class="bg-gray-600 hover:bg-gray-700 text-white px-4 py-2 rounded-lg transition-colors">
                <i class="fas fa-arrow-left mr-2"></i>Back to List
            </a>
        </div>
    </div>

    <!-- Content -->
    <div class="p-6">
        <div class="max-w-2xl mx-auto">
            <div class="bg-white rounded-lg shadow-md">
                <div class="px-6 py-4 border-b border-gray-200">
                    <h2 class="text-xl font-semibold text-gray-800">Create New ID Card Type</h2>
                </div>
                
                <form action="{{ route('id-card-types.store') }}" method="POST" class="p-6">
                    @csrf
                    
                    @if($errors->any())
                        <div class="bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded mb-4">
                            <ul class="list-disc list-inside">
                                @foreach($errors->all() as $error)
                                    <li>{{ $error }}</li>
                                @endforeach
                            </ul>
                        </div>
                    @endif

                    <div class="mb-6">
                        <label for="id_card_type" class="block text-sm font-medium text-gray-700 mb-2">
                            ID Card Type Name <span class="text-red-500">*</span>
                        </label>
                        <input type="text" 
                               id="id_card_type" 
                               name="id_card_type" 
                               value="{{ old('id_card_type') }}"
                               class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent @error('id_card_type') border-red-500 @enderror"
                               placeholder="e.g., National ID, Passport, Driver License"
                               required>
                        @error('id_card_type')
                            <p class="mt-1 text-sm text-red-600">{{ $message }}</p>
                        @enderror
                        <p class="mt-1 text-sm text-gray-500">
                            Enter the name of the ID card type (e.g., National ID, Passport, Driver License, etc.)
                        </p>
                    </div>

                    <div class="flex items-center justify-end space-x-3">
                        <a href="{{ route('id-card-types.index') }}" 
                           class="bg-gray-500 hover:bg-gray-600 text-white px-6 py-2 rounded-lg transition-colors">
                            Cancel
                        </a>
                        <button type="submit" 
                                class="bg-blue-600 hover:bg-blue-700 text-white px-6 py-2 rounded-lg transition-colors">
                            <i class="fas fa-save mr-2"></i>Create ID Card Type
                        </button>
                    </div>
                </form>
            </div>
        </div>
    </div>
@endsection 