import React, { useState } from 'react'; import { useForm, Head, Link } from '@inertiajs/react'; import { CheckCircle, Camera, Eye, EyeOff, X, Loader2, FileText, AlertCircle, CreditCard, ShieldCheck, ChevronRight, Lock, User, Mail, Phone as PhoneIcon, ArrowRight, ArrowLeft, Check, Briefcase } from 'lucide-react'; export default function Register() { const [step, setStep] = useState(1); const { data, setData, post, processing, errors } = useForm({ name: '', email: '', phone: '', password: '', password_confirmation: '', emirates_id_front: null, emirates_id_back: null, selected_plan: 'premium', card_number: '', expiry: '', cvc: '', }); const [showPassword, setShowPassword] = useState(false); const [frontFileName, setFrontFileName] = useState(null); const [backFileName, setBackFileName] = useState(null); const plans = [ { id: 'basic', name: 'Basic Search', price: '99', features: ['Browse 500+ workers', 'Shortlist up to 10', 'Standard vetting'] }, { id: 'premium', name: 'Premium Pass', price: '199', features: ['Unlimited shortlisting', 'Direct messaging', 'Priority scheduling'], popular: true }, { id: 'vip', name: 'VIP Concierge', price: '499', features: ['Assigned manager', 'Medical guarantee', 'Free replacements'] }, ]; const nextStep = () => setStep(prev => prev + 1); const prevStep = () => setStep(prev => prev - 1); const handleFileChange = (e, field) => { const file = e.target.files[0]; if (file) { setData(field, file); const sizeMb = (file.size / (1024 * 1024)).toFixed(1); if (field === 'emirates_id_front') { setFrontFileName(`${file.name} (${sizeMb} MB)`); } else { setBackFileName(`${file.name} (${sizeMb} MB)`); } } }; const removeFile = (field) => { setData(field, null); if (field === 'emirates_id_front') { setFrontFileName(null); } else { setBackFileName(null); } }; const handleSubmit = (e) => { e.preventDefault(); post('/employer/register'); }; const renderStepIndicator = () => (
Join 12,000+ employers hiring domestic workers directly with verified documentation.
{feat.desc}
Step {step} of 4: { step === 1 ? 'Account Security' : step === 2 ? 'Identity Verification' : step === 3 ? 'Choose Your Plan' : 'Secure Payment' }
Already part of the network?{' '} Authorize Account