/* HQWS components — Navbar, Footer, BriefModal, ProjectCard, CategoryFilter, RightsBanner, StickyCTA */
const { useState, useEffect, useMemo, useRef } = React;
const HQT = () => window.HQWS_DATA.TRANSLATIONS;
/* ─── shared bits ─── */
function Arrow({ size = 14 }) {
return (
);
}
function HQLogo({ height = 26 }) {
// small inline mark — we reference the SVG file for fidelity
return (
);
}
/* ─── Navbar ─── */
function Navbar({ route, navigate, lang, setLang, onBrief, light = false }) {
const t = HQT()[lang];
const items = [
{ id: "work", label: t.nav.work },
{ id: "capabilities", label: t.nav.capabilities },
{ id: "about", label: t.nav.about },
{ id: "clients", label: t.nav.clients },
{ id: "contact", label: t.nav.contact },
];
return (
);
}
/* ─── Rights banner ─── */
function RightsBanner({ lang }) {
const t = HQT()[lang].rights;
return (
);
}
/* ─── Footer ─── */
function Footer({ navigate, lang, onBrief }) {
const t = HQT()[lang];
return (
{t.footer.tagline}
{t.nav.brief}
INFO@HQWS.COM · +971 (0)4 395 8881
Offices
{window.HQWS_DATA.OFFICES.map(o => (
{o.city[lang]}
))}
© 1996–{new Date().getFullYear()} HQ WORLDWIDE SHOWS L.L.C. · PART OF BANIJAY GROUP
HQWS.COM · DUBAI · ABU DHABI · RIYADH · SYDNEY
);
}
/* ─── BriefModal ─── */
function BriefModal({ open, onClose, lang, initialCategory }) {
const t = HQT()[lang];
const [cat, setCat] = useState(initialCategory || "shows");
const [sent, setSent] = useState(false);
useEffect(() => { if (open) { setSent(false); setCat(initialCategory || "shows"); } }, [open, initialCategory]);
if (!open) return null;
return (
e.stopPropagation()}>
{!sent ? (
<>
{ lang === "ar" ? "اطلب عرضاً" : "REQUEST A PROPOSAL" }
{ lang === "ar" ? "أخبرنا عن المشروع." : "Tell us about the project." }
{ lang === "ar"
? "نحدّد فئة واحدة على الأقل لتوجيه طلبك إلى الفريق المناسب — لا أسعار، التصميم بحسب المشروع."
: "Pick at least one category so we route this to the right team. No prices — every brief is bespoke." }
{ lang === "ar" ? "نوع المشروع" : "Project category" }
{window.HQWS_DATA.CATEGORIES.map(c => (
setCat(c.id)}>
{c[lang]}
))}
{ lang === "ar" ? "ملخّص المشروع" : "Project brief" }
{ lang === "ar"
? "يُحال إلى info@hqws.com + سير CRM"
: "Routed to info@hqws.com + CRM webhook"}
setSent(true)}>
{ lang === "ar" ? "أرسل الموجز" : "Send brief" }
>
) : (
{ lang === "ar" ? "تمّ الاستلام." : "Brief received." }
{ lang === "ar"
? "سيتواصل فريق التطوير خلال يوم عمل واحد. شكراً."
: "Our new-business team will reply within one working day. Thank you." }
{ lang === "ar" ? "إغلاق" : "Close" }
)}
);
}
/* ─── Sticky CTA ─── */
function StickyCTA({ onClick, lang }) {
return (
{ lang === "ar" ? "اطلب عرضاً" : "Brief us" }
);
}
/* ─── Project Card ─── */
function ProjectCard({ p, lang, navigate, hideCategory }) {
const cats = window.HQWS_DATA.CATEGORIES;
const cat = cats.find(c => c.id === p.category);
return (
navigate(`case:${p.id}`)}>
{!hideCategory && cat &&
{cat[lang]} }
{p.name[lang]}
{p.location} · {p.client}
{p.year}
);
}
/* ─── Category Filter (chips) ─── */
function CategoryFilter({ active, setActive, lang, counts }) {
const cats = window.HQWS_DATA.CATEGORIES;
return (
{ lang === "ar" ? "صفِّ حسب" : "Filter" }
setActive("all")}>
{ lang === "ar" ? "الكل" : "All" } {counts.all}
{cats.map(c => (
setActive(c.id)}>
{c[lang]} {counts[c.id] || 0}
))}
);
}
/* expose */
Object.assign(window, { Arrow, HQLogo, Navbar, Footer, BriefModal, StickyCTA, ProjectCard, CategoryFilter, RightsBanner });