// App shell: Nav, locale switcher, consultation modal, mobile menu, sticky CTAs, and composition. const LOCALES = [ { id: "en", label: "EN" }, { id: "ar", label: "AR" }, { id: "ru", label: "RU" }, { id: "zh", label: "ZH" }, ]; function useLocale() { const [locale, setLocale] = useState(() => { try { return localStorage.getItem("cb_locale") || "en"; } catch { return "en"; } }); useEffect(() => { window.__cbLocale = locale; try { localStorage.setItem("cb_locale", locale); } catch {} const dir = window.CBI18N[locale].dir; document.documentElement.setAttribute("dir", dir); document.documentElement.setAttribute("lang", locale); }, [locale]); return [locale, setLocale]; } function Nav({ locale, setLocale, onBook, openMenu }) { const [scrolled, setScrolled] = useState(false); const t = window.CBI18N[locale]; useEffect(() => { const onScroll = () => setScrolled(window.scrollY > 24); window.addEventListener("scroll", onScroll); onScroll(); return () => window.removeEventListener("scroll", onScroll); }, []); return (
{t.nav.consult}
); } function LocaleSwitcher({ locale, setLocale }) { return (
{IconSet.globe} {LOCALES.map(l => ( ))}
); } // ─── Consultation modal ─────────────────────────────────────────────── function ConsultationModal({ open, onClose }) { const [step, setStep] = useState(0); const [form, setForm] = useState({ service: "", jurisdiction: "", name: "", contact: "", message: "" }); useEffect(() => { if (open) { setStep(0); setForm({ service: "", jurisdiction: "", name: "", contact: "", message: "" }); } }, [open]); useEffect(() => { if (!open) return; const onKey = (e) => { if (e.key === "Escape") onClose(); }; window.addEventListener("keydown", onKey); return () => window.removeEventListener("keydown", onKey); }, [open, onClose]); if (!open) return null; const services = window.CBDATA.services; const jurs = window.CBDATA.jurisdictions; const next = () => setStep(s => Math.min(s + 1, 3)); const back = () => setStep(s => Math.max(s - 1, 0)); const submit = () => setStep(3); return (
{ if (e.target.classList.contains("cb-modal")) onClose(); }}>
Book a free consultation
{[0, 1, 2].map(i => )}
{step === 0 && (

What's the focus?

Pick the closest fit — your consultant will refine.

{services.map(s => ( ))}
)} {step === 1 && (

Where are you setting up?

If you're not sure yet, pick "Not sure" — that's what we're here for.

{[...jurs, { id: "not-sure", name: "Not sure yet" }].map(j => ( ))}
)} {step === 2 && (

How should we reach you?

Same consultant will reply on the channel you prefer.