/* Shared components — Nav, Footer, primitives */ const { useState, useEffect, useRef, useMemo } = React; const NAV_ITEMS = [ { id: 'story', label: 'The Story' }, { id: 'collections', label: 'Collections' }, { id: 'craftsmanship', label: 'Craftsmanship' }, { id: 'projects', label: 'Projects' }, { id: 'bespoke', label: 'Bespoke' }, { id: 'impact', label: 'Impact' }, { id: 'showroom', label: 'Showroom' }, { id: 'contact', label: 'Contact' } ]; function go(id) { window.location.hash = '#/' + id; window.scrollTo({ top: 0, behavior: 'instant' }); } function useRoute() { const [route, setRoute] = useState(() => (window.location.hash.replace(/^#\//, '') || 'home')); useEffect(() => { const onHash = () => setRoute(window.location.hash.replace(/^#\//, '') || 'home'); window.addEventListener('hashchange', onHash); return () => window.removeEventListener('hashchange', onHash); }, []); return [route, (id) => go(id)]; } function Nav({ route, onNav, transparent }) { const [solid, setSolid] = useState(!transparent); const [open, setOpen] = useState(false); useEffect(() => { if (!transparent) { setSolid(true); return; } const onScroll = () => setSolid(window.scrollY > 60); onScroll(); window.addEventListener('scroll', onScroll, { passive: true }); return () => window.removeEventListener('scroll', onScroll); }, [transparent]); return (
onNav('home')}>
zuleya
by FBMI · Dubai
onNav('consultation')}>Book a consultation
{NAV_ITEMS.map(item => ( { onNav(item.id); setOpen(false); }}>{item.label} ))} { onNav('consultation'); setOpen(false); }} style={{ color: 'var(--gold)' }}>Book a consultation →
); } function Footer({ onNav }) { return ( ); } /* Primitives */ function Eyebrow({ children, dark }) { return
{children}
; } function CarpetCard({ c, dark, onOpen }) { const formatPrice = (n) => 'AED ' + n.toLocaleString('en-US'); return ( onOpen && onOpen(c)}>
{c.collection} {c.name}
{c.name}
{c.size}
From {formatPrice(c.priceAed)}
); } function QuickViewModal({ carpet, onClose, onEnquire, onSave, saved }) { useEffect(() => { if (!carpet) return; const onKey = (e) => { if (e.key === 'Escape') onClose(); }; document.addEventListener('keydown', onKey); return () => document.removeEventListener('keydown', onKey); }, [carpet, onClose]); return (
{carpet && (
e.stopPropagation()}>
{carpet.collection} collection

{carpet.name}

{carpet.notes}

Size{carpet.size}
Knots{carpet.knots}
Time at loom{carpet.months}
Dye{carpet.dye}
Woven in{carpet.origin}
AED {carpet.priceAed.toLocaleString('en-US')}
ONE-OF-ONE · INCL. CERTIFICATE OF AUTHENTICITY
)}
); } function Toast({ message, onDone }) { useEffect(() => { if (!message) return; const t = setTimeout(() => onDone(), 3400); return () => clearTimeout(t); }, [message, onDone]); return
{message}
; } function PageHeader({ eyebrow, title, lead, dark }) { return (
{eyebrow}

{title}

{lead &&

{lead}

}
); } function DiplomacyBand({ onNav }) { return (
The Tolerance Carpet · 2016

The carpet presented to His Holiness Pope Francis by His Highness Sheikh Mohamed bin Zayed Al Nahyan was hand-knotted in Mazar-i-Sharif.

Zuleya carpets have been gifted by His Highness Sheikh Mohamed bin Zayed Al Nahyan as state gifts — to Pope Francis, to President Barack Obama, to Bill Gates, to Christine Lagarde — drawn for each recipient, knotted by the same artisans who weave a Zuleya runner you can take home from Dubai Design District.

); } function CtaBand({ onNav }) { return (
Begin a piece
A consultation in d3, or a video call from your studio.
Forty-five minutes with our design team. Bring a floor plan, a fabric, a mood — we will brief samples within two weeks and a strike-off within six.
); } Object.assign(window, { useRoute, go, Nav, Footer, Eyebrow, CarpetCard, QuickViewModal, Toast, PageHeader, DiplomacyBand, CtaBand, NAV_ITEMS });