// Multi-step Book a Consultation flow — the conversion centrepiece. function BookingFlow({ go, prefill }) { const [step, setStep] = useState(0); // 0 treatment, 1 surgeon, 2 slot, 3 details, 4 success const [data, setData] = useState({ treatment: prefill?.treatment || null, surgeon: null, day: null, time: null, name: '', phone: '', email: '', countryCode: '+971', note: '', consent: false }); const update = (patch) => setData(prev => ({ ...prev, ...patch })); const steps = [ { n: '01', label: 'Treatment area' }, { n: '02', label: 'Surgeon or doctor' }, { n: '03', label: 'Preferred time' }, { n: '04', label: 'Your details' } ]; const treatments = [ { id: 'plastic-surgery', label: 'Plastic Surgery', sub: 'Face · Breast · Body', icon: Icon.user, surgical: true }, { id: 'skin', label: 'Skin & Aesthetics', sub: 'Injectables · Lasers · Facials', icon: Icon.sparkle, surgical: false }, { id: 'body', label: 'Body Contouring', sub: 'CoolSculpting · Surgical', icon: Icon.body, surgical: false }, { id: 'for-men', label: 'For Men', sub: 'Surgical & aesthetic', icon: Icon.man, surgical: true }, { id: 'wellness', label: 'Wellness', sub: 'IV · Nutrition · Regenerative', icon: Icon.drop, surgical: false }, { id: 'unsure', label: 'I\'m not sure yet', sub: 'A consultant will help triage', icon: Icon.alert, surgical: false } ]; // suggest surgeons based on treatment const surgeonOptions = useMemo(() => { const isSurgicalEnquiry = treatments.find(t => t.id === data.treatment)?.surgical; if (data.treatment === 'unsure') return DOCTORS.slice(0, 6); if (isSurgicalEnquiry) return DOCTORS.filter(d => d.title.toLowerCase().includes('plastic') || d.title.toLowerCase().includes('specialist')); return DOCTORS.filter(d => !d.title.toLowerCase().includes('plastic')); }, [data.treatment]); // Mock 14-day calendar starting today const days = useMemo(() => { const out = []; const today = new Date(); for (let i = 1; i <= 14; i++) { const d = new Date(today); d.setDate(today.getDate() + i); out.push({ date: d, dayName: d.toLocaleDateString('en-US', { weekday: 'short' }), dayNum: d.getDate(), month: d.toLocaleDateString('en-US', { month: 'short' }), disabled: d.getDay() === 0 // Sundays "by appointment only" }); } return out; }, []); const times = ['10:30', '11:30', '13:00', '14:30', '16:00', '17:30', '18:30', '19:30']; const next = () => setStep(s => Math.min(s + 1, 4)); const back = () => setStep(s => Math.max(s - 1, 0)); const canNext = ( (step === 0 && data.treatment) || (step === 1 && data.surgeon) || (step === 2 && data.day && data.time) || (step === 3 && data.name && data.phone && data.email && data.consent) ); const selectedTreatment = treatments.find(t => t.id === data.treatment); const selectedSurgeon = DOCTORS.find(d => d.slug === data.surgeon); return (
Book a Consultation
{step === 0 && (

What would you like to discuss?

Pick a stream of care — we'll match you to the right consultant next.

{treatments.map(t => ( ))}
{selectedTreatment?.surgical && (
Surgical procedures require an in-person paid consultation, candidacy assessment and full risk disclosure before booking. Performed by DHA-licensed surgeons.
)}
)} {step === 1 && (

Choose your consultant

We've narrowed this to the team members who handle {selectedTreatment?.label.toLowerCase()}. You can also let reception decide.

{surgeonOptions.map(s => ( ))}
)} {step === 2 && (

Pick a preferred day & time

We'll confirm the exact slot when reception calls you back. Sunday is by appointment only.

Next 14 days
{days.slice(0, 7).map((d, i) => ( ))}
{days.slice(7, 14).map((d, i) => ( ))}
{data.day && (
Times for {data.day.dayName} {data.day.dayNum} {data.day.month}
{times.map(t => ( ))}
All times Gulf Standard Time (GST). Indicative — reception confirms availability.
)}
)} {step === 3 && (

Just your contact details

No medical history here — that's discussed in person, with the consultant.

Treatment {selectedTreatment?.label}
Consultant {data.surgeon === 'any' ? 'No preference — reception to match' : selectedSurgeon?.name}
Preferred {data.day?.dayName} {data.day?.dayNum} {data.day?.month} · {data.time} GST
update({ name: e.target.value })} />
update({ phone: e.target.value.replace(/[^\d\s]/g, '') })} />
update({ email: e.target.value })} />