/* eslint-disable no-undef */
/* ──────────────────────────────────────────────────────────────────────
Shell: Logo, Navbar, Footer, ConsultModal, WhatsAppFab, MobileCTA.
All RTL-aware. EN/AR toggle handled here.
────────────────────────────────────────────────────────────────────── */
const { useState, useEffect, useRef } = React;
const { Ic } = window.VZ_DATA;
/* ── Logo: a minimal, ORIGINAL wordmark for the concept site.
Uses a stylised "V" notch on the right (a nod to the brand monogram in
the supplied logo SVG) — not a redraw of the production logo. */
function Logo({ light = false, size = 26 }) {
const c = light ? "white" : "var(--ink)";
return (
{ e.preventDefault(); window.__vzNav?.("home"); }} style={{ display: "flex", alignItems: "center", gap: 10 }}>
Virtuzone
);
}
window.Logo = Logo;
/* ── Locale Toggle ───────────────────────────────────────────────────── */
function LocaleToggle({ locale, setLocale, dark = false }) {
return (
{["en", "ar", "ru", "zh"].map((l) => (
setLocale(l)}
style={{
padding: "5px 10px", fontSize: 12, fontWeight: 580,
color: locale === l ? "white" : (dark ? "rgba(255,255,255,0.7)" : "var(--steel)"),
}}
>
{l.toUpperCase()}
))}
);
}
window.LocaleToggle = LocaleToggle;
/* ── Navbar ──────────────────────────────────────────────────────────── */
function Navbar({ route, nav, locale, setLocale, openConsult, dark = false }) {
const { T } = window.VZ_DATA;
const t = T[locale] || T.en;
const [open, setOpen] = useState(false);
const items = [
{ id: "services", label: t.nav.services },
{ id: "jurisdictions", label: t.nav.jurisdictions },
{ id: "calculator", label: t.nav.calc },
{ id: "golden-visa", label: t.nav.goldenVisa },
{ id: "resources", label: t.nav.resources },
{ id: "about", label: t.nav.about },
];
return (
);
}
window.Navbar = Navbar;
/* ── Footer ──────────────────────────────────────────────────────────── */
function Footer({ locale, nav }) {
const { T, services } = window.VZ_DATA;
const t = T[locale] || T.en;
return (
UAE business setup, made simple. Mainland · free zone · offshore · visas · banking · tax · compliance.
);
}
window.Footer = Footer;
/* ── Consultation Modal ──────────────────────────────────────────────── */
function ConsultModal({ open, onClose, prefill = {} }) {
const [step, setStep] = useState(0);
const [form, setForm] = useState({
name: "", email: "", phone: "",
nationality: "",
intent: prefill.intent || "Start a new UAE business",
service: prefill.service || "Company Formation",
jurisdiction: prefill.jurisdiction || "Free Zone",
timeline: "Within 3 months",
msg: "",
});
const [done, setDone] = useState(false);
useEffect(() => { if (open) { setStep(0); setDone(false); } }, [open]);
if (!open) return null;
const upd = (k, v) => setForm((f) => ({ ...f, [k]: v }));
const stepDone = step === 0
? form.intent && form.service && form.jurisdiction
: form.name && form.email && form.phone;
return (
e.stopPropagation()}>
{done ? "Confirmed" : (step === 0 ? "Step 1 of 2" : "Step 2 of 2")}
Free consultation
{Ic.close()}
{done ? (
{Ic.check({ width: 22, height: 22 })}
Thanks, {form.name.split(" ")[0] || "founder"}.
A senior advisor will be in touch within one business day to walk through your {form.service.toLowerCase()} options.
) : (
<>
Tell us what you're building.
A free 30-min call with a senior advisor — no obligation, indicative ranges only.
{step === 0 && (
upd("intent",v)}
options={["Start a new UAE business","Expand an existing business to UAE","Move my company / re-domicile","Apply for the Golden Visa","Just exploring"]} />
upd("service",v)}
options={["Company Formation","Visa & PRO","Golden Visa","Bank Account","Accounting & Tax","Other"]} />
upd("jurisdiction",v)}
options={["Mainland","Free Zone","Offshore","Not sure yet"]} />
Timeline
upd("timeline",e.target.value)}>
Within 1 month
Within 3 months
Within 6 months
Just exploring
)}
{step === 1 && (
)}
{Ic.check({ stroke: "var(--vz-red)" })}No fixed pricing — indicative ranges, confirmed live.
{step > 0 && setStep(0)}>← Back }
{step === 0
? setStep(1)} style={{ opacity: stepDone ? 1 : 0.6 }}>Continue {Ic.arrow()}
: setDone(true)} style={{ opacity: stepDone ? 1 : 0.6 }}>Book my consultation {Ic.arrow()} }
>
)}
);
}
window.ConsultModal = ConsultModal;
/* helper — radio chips inside modal */
function Radios({ label, value, onChange, options }) {
return (
{label}
{options.map((o) => (
onChange(o)}
style={{
padding: "9px 14px", borderRadius: 999,
fontSize: 13.5, fontWeight: 540,
border: "1px solid " + (value === o ? "var(--ink)" : "var(--line-2)"),
background: value === o ? "var(--ink)" : "white",
color: value === o ? "white" : "var(--ink)",
}}>
{o}
))}
);
}
/* ── WhatsApp FAB ────────────────────────────────────────────────────── */
function WhatsAppFab() {
return (
{Ic.wa()}
);
}
window.WhatsAppFab = WhatsAppFab;
/* ── Mobile bottom CTA ───────────────────────────────────────────────── */
function MobileCTA({ onConsult }) {
return (
Ready to start?
Book a call
);
}
window.MobileCTA = MobileCTA;