/* global React */ /* Shared chrome: TopStrip, Nav, Footer, EmergencyPill, LocationSwitcher */ const { useState, useEffect, useRef } = React; const D = window.BVH_DATA; function TopStrip() { return (
24/7 EMERGENCY — call {D.hospital.phoneMain} RCVS-LED · ICU ON SITE · DUBAI · EN · عربي
); } function Nav({ route, setRoute, location, setLocation }) { const links = [ { id: "home", label: "Home" }, { id: "services", label: "Services" }, { id: "team", label: "Team" }, { id: "locations", label: "Locations" }, { id: "emergency", label: "Emergency" }, { id: "about", label: "About" }, ]; return ( ); } function LocationSwitcher({ location, setLocation, big }) { const [open, setOpen] = useState(false); const ref = useRef(null); useEffect(() => { function onDoc(e) { if (ref.current && !ref.current.contains(e.target)) setOpen(false); } document.addEventListener("mousedown", onDoc); return () => document.removeEventListener("mousedown", onDoc); }, []); const current = D.locations.find(l => l.id === location); return (
{open && (
{D.locations.map(l => ( ))}
)}
); } function EmergencyPill() { return (
24/7 Emergency · {D.hospital.phoneMain} WhatsApp us
); } function Footer({ setRoute }) { return ( ); } /* small util — render a title array with ... markers */ function RenderTitle({ chunks }) { return (

{chunks.map((c, i) => ( {c.includes('') ? {c.replace(/<\/?em>/g,'')} : c} {i < chunks.length-1 && ' '} ))}

); } Object.assign(window, { TopStrip, Nav, LocationSwitcher, EmergencyPill, Footer, RenderTitle, BVH_D: D });