// ============================================================
// components.jsx — Shared components
// ============================================================
const { useState, useEffect, useRef } = React;
// Original geometric sun motif — not the existing logo, our own interpretation
function SunMark({ size = 36, color = "#B8975A", strokeColor }) {
const stroke = strokeColor || color;
return (
);
}
function ArrowRight({ size = 14 }) {
return (
);
}
// ============================================================
// Nav
// ============================================================
function Nav({ route, go, locale, setLocale }) {
const [mobileOpen, setMobileOpen] = useState(false);
const links = [
{ id: "treatments", label: "Treatments" },
{ id: "dentists", label: "Our Dentists" },
{ id: "about", label: "About" },
{ id: "gallery", label: "Smile Gallery" },
{ id: "tourism", label: "Dental Tourism" },
{ id: "contact", label: "Contact" }
];
return (
Versailles
Dental Clinic · Dubai
);
}
// ============================================================
// Footer
// ============================================================
function Footer({ go }) {
const { TREATMENTS, DENTISTS } = window.__VDC_DATA__;
return (
);
}
// ============================================================
// Mobile bottom bar
// ============================================================
function MobileBar({ go }) {
return (
);
}
// ============================================================
// Section header (numbered, editorial)
// ============================================================
function SectionHead({ num, title, meta }) {
return (
);
}
// ============================================================
// Trust strip
// ============================================================
function TrustStrip() {
const items = [
{ k: "Est. 2007", v: "Dubai Healthcare City" },
{ k: "French heritage", v: "Founder-led practice" },
{ k: ~4.9★, v: "Google — 300+ reviews · re-verify" },
{ k: "DHA-licensed", v: "Licence [client to supply]" },
{ k: "EN · FR · AR · ZH", v: "Multilingual care" }
];
return (
{items.map((it, i) => (
))}
);
}
// ============================================================
// CTA Band
// ============================================================
function CTABand({ go }) {
return (
Bonjour — welcome
Begin with a consultation.
The rest will follow.
A first visit at Versailles is unhurried — examination, photographs and a written plan, before any treatment is agreed.
);
}
// ============================================================
// Toast (small confirmation popups)
// ============================================================
function useToast() {
const [msg, setMsg] = useState(null);
useEffect(() => {
if (!msg) return;
const t = setTimeout(() => setMsg(null), 2400);
return () => clearTimeout(t);
}, [msg]);
return [msg, setMsg];
}
Object.assign(window, {
SunMark, ArrowRight, Nav, Footer, MobileBar, SectionHead, TrustStrip, CTABand, useToast
});