<x-app-layout>
    <x-slot name="title">New Vendor Pre-Qualification</x-slot>
    
    <div class="mb-6">
        <a href="{{ route('vendors.index') }}" class="text-primary-600 hover:text-primary-900 text-sm font-medium">&larr; Back to Vendors</a>
    </div>

    <div class="bg-white rounded-xl shadow-sm border border-gray-100 overflow-hidden">
        <div class="px-6 py-5 border-b border-gray-100 bg-gray-50 flex justify-between items-center">
            <div>
                <h3 class="text-lg font-bold text-gray-900">Vendor Pre-Qualification Form</h3>
                <p class="text-sm text-gray-500">Register a new Consultant, Contractor, or Supplier.</p>
            </div>
        </div>

        <form action="{{ route('vendors.store') }}" method="POST" class="p-6 space-y-8">
            @csrf

            <div>
                <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
                    <div>
                        <label class="block text-sm font-medium text-gray-700 mb-1">Registration Type *</label>
                        <select name="registration_type" required class="w-full border-gray-300 rounded-md shadow-sm focus:ring-primary-500 focus:border-primary-500 sm:text-sm">
                            <option value="">Select Type</option>
                            <option value="Consultant">Consultant</option>
                            <option value="Contractor">Contractor</option>
                            <option value="Supplier">Supplier</option>
                            <option value="Service Provider">Service Provider</option>
                        </select>
                    </div>
                    <div>
                        <label class="block text-sm font-medium text-gray-700 mb-1">Category *</label>
                        <select name="category" required class="w-full border-gray-300 rounded-md shadow-sm focus:ring-primary-500 focus:border-primary-500 sm:text-sm">
                            <option value="">Select Category</option>
                            <option value="Design & Engineering">Design & Engineering</option>
                            <option value="Building Contractor">Building Contractor</option>
                            <option value="Infrastructure Contractor">Infrastructure Contractor</option>
                            <option value="Material Supplier">Material Supplier</option>
                            <option value="Specialized Contractor">Specialized Contractor</option>
                        </select>
                    </div>
                    <div>
                        <label class="block text-sm font-medium text-gray-700 mb-1">Vendor/Company Name *</label>
                        <input type="text" name="vendor_name" required class="w-full border-gray-300 rounded-md shadow-sm focus:ring-primary-500 focus:border-primary-500 sm:text-sm">
                    </div>
                    <div>
                        <label class="block text-sm font-medium text-gray-700 mb-1">Phone No. *</label>
                        <input type="text" name="phone" required class="w-full border-gray-300 rounded-md shadow-sm focus:ring-primary-500 focus:border-primary-500 sm:text-sm">
                    </div>
                    <div>
                        <label class="block text-sm font-medium text-gray-700 mb-1">Email</label>
                        <input type="email" name="email" class="w-full border-gray-300 rounded-md shadow-sm focus:ring-primary-500 focus:border-primary-500 sm:text-sm">
                    </div>
                </div>
            </div>
            
            <div class="pt-5 border-t border-gray-200 flex justify-end gap-3">
                <a href="{{ route('vendors.index') }}" class="px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50">Cancel</a>
                <button type="submit" class="px-4 py-2 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-primary-600 hover:bg-primary-700">Submit Form</button>
            </div>
        </form>
    </div>
</x-app-layout>
