// ============================================================
// JET LUXE — UI components
// ============================================================
const { useState, useEffect, useRef, useMemo, Fragment } = React;
// helper to render text-with-italic-fragments: array of strings or {i: ...} objects
function RichText({ parts }) {
if (!Array.isArray(parts)) return {parts} ;
return (
{parts.map((p, i) => {
if (typeof p === 'string') return {p} ;
if (p && p.i) return {p.i} ;
return null;
})}
);
}
// ============================================================
// NAV
// ============================================================
function Nav({ t, locale, setLocale, onQuote }) {
const [scrolled, setScrolled] = useState(false);
useEffect(() => {
const onScroll = () => setScrolled(window.scrollY > 60);
window.addEventListener('scroll', onScroll);
return () => window.removeEventListener('scroll', onScroll);
}, []);
const links = [
{ k: 'services', href: '#services' },
{ k: 'fleet', href: '#fleet' },
{ k: 'invictus', href: '#invictus' },
{ k: 'flightcare', href: '#flightcare' },
{ k: 'about', href: '#about' },
{ k: 'contact', href: '#contact' }
];
return (
J
Jet Luxe
setLocale('en')}
aria-pressed={locale === 'en'}
>EN
·
setLocale('ar')}
aria-pressed={locale === 'ar'}
>AR
{t.nav.cta}
);
}
// ============================================================
// HERO
// ============================================================
function Hero({ t, onQuote, hero }) {
return (
{t.hero.eyebrow}
{t.hero.sub}
{t.hero.meta[0]}
{t.hero.meta[1]}
{t.hero.scroll}
);
}
// ============================================================
// TRUST STRIP + MARQUEE
// ============================================================
function TrustStrip({ t }) {
return (
{t.trust.map((item, i) => (
{item.num}
{item.label}
{i < t.trust.length - 1 && }
))}
);
}
function Marquee({ locale }) {
const items = locale === 'ar'
? ['وسيط ARGUS معتمد', 'معايير Forbes Travel Guide', 'مرخّصة في خمس ولايات قضائية', 'بقيادة المؤسس · منذ ٢٠٢٠', 'مكاتب في ست مدن']
: ['ARGUS Certified Broker', 'Forbes Travel Guide service standards', 'Licensed across five jurisdictions', 'Founder-led · since 2020', 'Six cities · one team'];
// duplicate for seamless scroll
const doubled = [...items, ...items];
return (
{doubled.map((it, i) => (
{it}◆
))}
);
}
// ============================================================
// SERVICES
// ============================================================
function Services({ t, onQuote }) {
return (
{t.services.items.map((it, i) => (
— {it.idx}
{it.glyph}
{it.name}
{it.desc}
{t.locale === 'ar' ? 'استفسر' : 'Enquire'}
))}
);
}
// ============================================================
// FLEET
// ============================================================
function Fleet({ t, onQuote }) {
const [cat, setCat] = useState(t.fleet.categories[0]);
const cards = useMemo(() => {
if (cat === t.fleet.categories[0]) return t.fleet.cards;
return t.fleet.cards.filter(c => c.cat === cat);
}, [cat, t]);
return (
{/* feature */}
{t.fleet.feature.tag}
{t.fleet.feature.desc}
{t.fleet.feature.specs.map((s, i) => (
{s.lbl}
{s.val}{s.unit && {s.unit} }
))}
{t.fleet.feature.cta}
{/* category filter */}
{t.fleet.categories.map(c => (
setCat(c)}>
{c}
))}
{/* grid */}
{cards.map((c, i) => (
{c.cat}
{c.name}
{c.pax} · {c.range}
))}
);
}
// ============================================================
// INVICTUS
// ============================================================
function Invictus({ t, onQuote }) {
const [tier, setTier] = useState('invictus');
const tierData = t.invictus.tiers[tier];
return (
Membership · 2026
{t.invictus.eyebrow}
{t.invictus.lead}
{Object.entries(t.invictus.tiers).map(([id, td]) => (
setTier(id)}
role="tab"
aria-selected={tier === id}
>{td.label}
))}
{tierData.rows.map((r, i) => (
{r.k}
))}
);
}
// ============================================================
// FLIGHT CARE
// ============================================================
function FlightCare({ t }) {
return (
{t.flightcare.eyebrow}
{t.flightcare.paragraphs.map((p, i) => (
{p}
))}
{t.flightcare.signature.map((s, i) => (
))}
);
}
// ============================================================
// PRESENCE
// ============================================================
function Presence({ t }) {
return (
{t.presence.cities.map((c, i) => (
{c.num}
{c.city}
{c.meta}
))}
);
}
// ============================================================
// ABOUT
// ============================================================
function About({ t }) {
return (
{t.about.eyebrow}
{t.about.paragraphs.map((p, i) => (
{p}
))}
{t.about.signature.map((s, i) => (
))}
);
}
// ============================================================
// CONTACT
// ============================================================
function Contact({ t, onQuote }) {
return (
);
}
// ============================================================
// FOOTER
// ============================================================
function Footer({ t }) {
return (
J
Jet Luxe
{t.footer.tag}
{t.footer.cols.map((col, i) => (
{col.h}
{col.items.map((it, j) => (
{it}
))}
))}
{t.footer.legal}
{t.footer.socials}
);
}
// ============================================================
// WHATSAPP FAB
// ============================================================
function WhatsAppFab() {
return (
);
}
Object.assign(window, {
RichText, Nav, Hero, TrustStrip, Marquee,
Services, Fleet, Invictus, FlightCare,
Presence, About, Contact, Footer, WhatsAppFab
});