/* ============================================================ AACSH — Shared components: logo, nav, footer, appointment modal ============================================================ */ const { useState, useEffect, useRef, useMemo, useCallback } = React; /* ============================================================ FlameMark — original SVG (NOT the raster logo). Refined for hospital tone. ============================================================ */ function FlameMark({ size = 28, mono = false }) { const id = `g-${Math.random().toString(36).slice(2, 7)}`; return ( ); } /* ============================================================ Logo lockup ============================================================ */ function Logo({ size = 30, stacked = false, mono = false }) { return (
American Academy of
Cosmetic Surgery Hospital
); } /* ============================================================ Top nav with mega-menu ============================================================ */ function TopNav({ onNavigate, currentPath, onBook }) { const [open, setOpen] = useState(null); // "departments" | "doctors" | null const [scrolled, setScrolled] = useState(false); const [lang, setLang] = useState("EN"); useEffect(() => { const fn = () => setScrolled(window.scrollY > 24); window.addEventListener("scroll", fn); return () => window.removeEventListener("scroll", fn); }, []); const depts = window.AACSH_DATA.departments; return (
setOpen(null)}> {/* Top utility row */}
Open today · 09:00 — 21:00 Building 73, Dubai Healthcare City
{window.AACSH_DATA.contact.phone} {window.AACSH_DATA.contact.email}
{/* Main nav row */}
{/* Mega menu — departments */} {open === "departments" && (
Care under one roof
Ten specialities. One JCI-accredited hospital.

Cosmetic & plastic surgery is our anchor — surrounded by medical, aesthetic and wellness specialities so patients can receive coordinated care in a single environment.

{depts.map(d => ( ))}
)}
); } function NavItem({ label, active, onClick, onMouseEnter, caret }) { return ( ); } function LangSwitch({ lang, setLang }) { const [open, setOpen] = useState(false); const langs = ["EN", "AR", "RU", "ZH"]; return (
setOpen(false)}> {open && (
{langs.map(l => ( ))}
)}
); } /* ============================================================ Trust strip — JCI + DHCC + DHA marks ============================================================ */ function TrustStrip({ compact = false }) { const items = window.AACSH_DATA.accreditations; return (
{items.map((a, i) => (
{a.name}
{!compact && (
{a.detail}
)}
))}
); } function AccreditationMark({ code }) { const sx = { width: 44, height: 44, borderRadius: 999, display: "flex", alignItems: "center", justifyContent: "center", fontFamily: "var(--font-serif)", fontSize: 13, fontWeight: 500, flexShrink: 0, }; const styles = { JCI: { ...sx, background: "var(--plum)", color: "white", letterSpacing: 0.5 }, DHCC: { ...sx, background: "white", border: "1.5px solid var(--plum)", color: "var(--plum)", fontSize: 11 }, DHA: { ...sx, background: "var(--cream)", border: "1.5px solid var(--gold)", color: "var(--gold)" }, MOH: { ...sx, background: "white", border: "1.5px solid var(--ink)", color: "var(--ink)" }, }; return
{code}
; } /* ============================================================ Appointment modal — multi-step ============================================================ */ function AppointmentModal({ open, onClose, prefillDept, prefillProcedure }) { const [step, setStep] = useState(0); const [data, setData] = useState({ dept: "", procedure: "", date: "", time: "", firstName: "", lastName: "", phone: "", email: "", note: "", international: false, }); useEffect(() => { if (open) { setStep(0); setData(d => ({ ...d, dept: prefillDept || d.dept, procedure: prefillProcedure || d.procedure, })); } }, [open, prefillDept, prefillProcedure]); if (!open) return null; const update = (k, v) => setData(d => ({ ...d, [k]: v })); const dept = window.AACSH_DATA.departments.find(d => d.slug === data.dept); const next = () => setStep(s => Math.min(s + 1, 3)); const back = () => setStep(s => Math.max(s - 1, 0)); const canProceed = () => { if (step === 0) return !!data.dept; if (step === 1) return !!data.date && !!data.time; if (step === 2) return !!data.firstName && !!data.phone; return true; }; return (
e.stopPropagation()} style={{ width: "100%", maxWidth: 720, background: "white", borderRadius: 20, overflow: "hidden", maxHeight: "92vh", display: "flex", flexDirection: "column", boxShadow: "0 50px 100px rgba(22,18,28,0.4)", }}> {/* Header */}
Step {step + 1} of 4
{["Choose care", "Pick a date", "Your details", "Confirmed"][step]}
{/* Stepper */}
{[0,1,2,3].map(i => (
))}
{/* Body */}
{step === 0 && ( )} {step === 1 && ( )} {step === 2 && ( )} {step === 3 && ( )}
{/* Footer */}
{step < 3 ? ( <> Minimal details only · we never collect medical history in a form ) : ( A care coordinator will be in touch within one business hour. )}
{step > 0 && step < 3 && ( )} {step < 3 ? ( ) : ( )}
); } function BookingStepCare({ data, update }) { const depts = window.AACSH_DATA.departments; const dept = depts.find(d => d.slug === data.dept); return (
{depts.map(d => ( ))}
{dept && (
{dept.procedures.map(p => ( ))}
)}
); } function BookingStepDate({ data, update }) { const today = new Date(); const days = [...Array(14)].map((_, i) => { const d = new Date(today); d.setDate(d.getDate() + i); return d; }); const times = ["09:30", "10:30", "11:30", "13:00", "14:30", "16:00", "17:00", "18:30", "20:00"]; const fmtDate = d => d.toISOString().slice(0, 10); return (
{days.map(d => { const iso = fmtDate(d); const isSel = data.date === iso; return ( ); })}
{times.map(t => ( ))}
Hours are 09:00–21:00, seven days a week. Times shown are provisional; a coordinator confirms by phone or email before any visit is locked in.
); } function BookingStepDetails({ data, update }) { return (
update("firstName", v)} /> update("lastName", v)} />
update("phone", v)} placeholder="+971 ..." /> update("email", v)} placeholder="you@example.com" type="email" /> update("note", v)} multiline rows={3} placeholder="Best time to call, preferred language, etc." />
Please do not share medical history through this form. Clinical details are taken securely during your consultation, not in an unencrypted web form.
); } function BookingStepConfirm({ data, dept }) { const proc = dept?.procedures.find(p => p.slug === data.procedure); return (
Request received

Thank you, {data.firstName || "patient"}. A coordinator will contact you within one business hour to confirm your appointment.

{proc && } {data.international && International patient} />}
); } function Row({ k, v }) { return (
{k} {v || "—"}
); } function Field({ label, value, onChange, multiline, rows, placeholder, type }) { return (