/* Symphony — shared components */ // Note: React.useState/React.useEffect/React.useRef are accessed via React.* to avoid scope collisions across babel scripts // ───────────── Icons (inline SVG, monoline) ───────────── const Icon = { Star: (p) => , Arrow: (p) => , Check: (p) => , Phone: (p) => , WhatsApp: (p) => , Mail: (p) => , Pin: (p) => , Clock: (p) => , Sparkle: (p)=> , Shield: (p) => , Parking: (p)=> , Laser: (p) => , }; // ───────────── Fresha rating badge ───────────── function FreshaBadge({ compact }) { return ( ★★★★★ 4.9{compact ? '' : ' · 908 reviews'} Fresha ); } // ───────────── Navbar ───────────── function Navbar({ route, onNavigate }) { const links = [ ['home', 'Home'], ['treatments', 'Treatments'], ['laser', 'Laser'], ['team', 'Team'], ['reviews', 'Reviews'], ['contact', 'Contact'], ]; return ( ); } // ───────────── WhatsApp floating ───────────── function WhatsAppFab() { return ( WhatsApp us ); } // ───────────── Footer ───────────── function Footer({ onNavigate }) { return ( ); } // ───────────── Booking form (consultation) ───────────── function BookingForm({ compact, presetTreatment }) { const [form, setForm] = React.useState({ name: "", phone: "", email: "", treatment: presetTreatment || "", date: "", notes: "", }); const [errors, setErrors] = React.useState({}); const [submitted, setSubmitted] = React.useState(false); const validate = () => { const e = {}; if (!form.name.trim()) e.name = "Please enter your name"; if (!form.phone.match(/^[+0-9 ()-]{7,}$/)) e.phone = "Add a contactable number"; if (form.email && !form.email.match(/^[^\s@]+@[^\s@]+\.[^\s@]+$/)) e.email = "Check the email format"; if (!form.treatment) e.treatment = "Pick a treatment area"; return e; }; const submit = (ev) => { ev.preventDefault(); const e = validate(); setErrors(e); if (Object.keys(e).length === 0) { setSubmitted(true); } }; if (submitted) { return (

Thank you, {form.name.split(' ')[0]}

One of our team will reach out within a few hours to confirm your consultation. Prefer right now? WhatsApp or call us.

WhatsApp now Call clinic
); } const f = (k, v) => setForm({ ...form, [k]: v }); return (
{!compact && (
Book a Consultation

We'll call you back the same day.

)}
f('name', e.target.value)} placeholder="Sarah Mokhtar" /> {errors.name && {errors.name}}
f('phone', e.target.value)} placeholder="+971 50 …" /> {errors.phone && {errors.phone}}
f('email', e.target.value)} placeholder="you@example.com" /> {errors.email && {errors.email}}
{errors.treatment && {errors.treatment}}
f('date', e.target.value)} />