/* Screens: Home, Inventory, Vehicle Detail, Services, Export, Contact */
const { useState: useStateS, useEffect: useEffectS, useMemo: useMemoS, useRef: useRefS } = React;
/* ============================================================
HOME
============================================================ */
function ScreenHome({ go, openLead, locale }) {
const t = I18N[locale];
const featured = VEHICLES.slice(0, 6);
return (
{/* ===== HERO ===== */}
{/* ===== TRUST STRIP ===== */}
{t.trust.map((line, i) => (
0{i + 1}
{line}
))}
{/* ===== FEATURED RAIL ===== */}
Just Arrived · Hand-Selected
Featured vehicles from the floor
go('inventory')}>View All Inventory
{featured.map((v) => (
go('vehicle', id)} locale={locale} />
))}
{/* ===== ELITE APPROVED BAND ===== */}
Elite Approved · 320-Point Inspection
Every pre-owned car passes 320 checks.
Specialist technicians inspect each Elite Approved vehicle against a 320-point technical
standard — mechanical, electrical, cosmetic, documentation. RTA testing applied where
applicable.
go('vehicle', 'ferrari-california-t')}>See a Certified Car
How Approval Works
{[
['Mechanical', '142'],
['Electrical', '76'],
['Cosmetic', '54'],
['Documentation', '48'],
].map(([k, n]) => (
))}
The Elite Cars · Service Centre
{/* ===== BRAND WALL ===== */}
Marques in House
Pre-owned · Distribution · Authorised
All trademarks are property of their owners. The Elite Cars is not endorsed by any car manufacturer.
{[...BRANDS, ...DISTRIBUTION_BRANDS].map((b, i) => (
= BRANDS.length ? 'var(--accent)' : 'var(--text)',
display: 'flex', alignItems: 'center', justifyContent: 'center', gap: 10,
}}>
{b}
{i >= BRANDS.length && UAE }
))}
{/* ===== SERVICES TEASER ===== */}
{[
{ eyebrow: 'Sell · Trade-in · Consign', title: 'Sell your luxury car', body: 'Accurate valuations, smooth bank-loan settlements, and upgrade assistance — handled by our specialists.', kind: 'tradein' },
{ eyebrow: 'Finance & Leasing', title: 'Flexible EMI plans', body: 'Tailored finance packages with UAE banking partners. Easy, personalised, hassle-free.', kind: 'finance' },
{ eyebrow: 'Worldwide Export', title: 'Ship anywhere', body: 'Strong export capability, with shipping handled to buyers across GCC, Europe, Asia, and the Americas.', kind: 'export' },
].map((c) => (
(e.currentTarget.style.borderColor = 'var(--accent-dim)')}
onMouseLeave={(e) => (e.currentTarget.style.borderColor = 'var(--line)')}>
{c.eyebrow}
{c.title}
{c.body}
openLead({ kind: c.kind })}>Enquire
))}
{/* ===== SHOWROOM SPLIT ===== */}
Visit · Open 7 Days
Four showroomsacross the UAE.
Two showrooms in Dubai (Al Quoz & Sheikh Zayed Road), our Sharjah location at Souq Al Haraj,
and the Abu Dhabi flagship on Al Maqta Road. Concierge appointments available.
{SHOWROOMS.map((s) => (
{s.city}{s.badge ? ` · ${s.badge}` : ''}
{s.name}
{s.address}
))}
go('contact')}>Find a Showroom
);
}
/* ---------- HERO (variant-driven by Tweaks heroTreatment) ---------- */
function Hero({ t, go, openLead }) {
const heroTreatment = document.documentElement.getAttribute('data-hero') || 'still';
const [activeIdx, setActiveIdx] = useStateS(0);
const heroImages = ['media/veh-bentley-bentayga.webp', 'media/gal-show-1.webp', 'media/showroom-1.webp', 'media/gal-ferrari-cal.webp'];
useEffectS(() => {
if (heroTreatment !== 'loop') return;
const id = setInterval(() => setActiveIdx((i) => (i + 1) % heroImages.length), 4500);
return () => clearInterval(id);
}, [heroTreatment]);
if (heroTreatment === 'split') {
return (
{t.hero.eyebrow}
{t.hero.title1}{t.hero.title2} {t.hero.title3}.
{t.hero.body}
);
}
return (
{heroImages.map((src, i) => (
))}
{t.hero.eyebrow}
{t.hero.title1}{t.hero.title2} {t.hero.title3}.
{t.hero.body}
{heroTreatment === 'loop' && heroImages.map((_, i) => (
setActiveIdx(i)}
style={{ width: i === activeIdx ? 28 : 12, height: 2, background: i === activeIdx ? 'var(--accent)' : 'rgba(242,239,231,.3)', transition: 'all .3s', padding: 0 }}
aria-label={`Slide ${i+1}`}
/>
))}
{/* hero footer ribbon */}
Elite Group Holding · ADGM-Registered
Authorised Lynk & Co Distributor — UAE
800-ELITE-CARS · WhatsApp Concierge
);
}
/* ============================================================
INVENTORY
============================================================ */
function ScreenInventory({ go, locale }) {
const t = I18N[locale];
const [filters, setFilters] = useStateS({ make: 'all', body: 'all', condition: 'all', sort: 'newest' });
const [view, setView] = useStateS('grid'); // grid | list
const filtered = useMemoS(() => {
let r = VEHICLES.slice();
if (filters.make !== 'all') r = r.filter((v) => v.make === filters.make);
if (filters.body !== 'all') r = r.filter((v) => v.body === filters.body);
if (filters.condition !== 'all') r = r.filter((v) => v.condition === filters.condition);
if (filters.sort === 'newest') r.sort((a, b) => b.year - a.year);
if (filters.sort === 'oldest') r.sort((a, b) => a.year - b.year);
if (filters.sort === 'mileage') r.sort((a, b) => a.mileage - b.mileage);
return r;
}, [filters]);
const makes = ['all', ...Array.from(new Set(VEHICLES.map((v) => v.make)))];
const bodies = ['all', ...Array.from(new Set(VEHICLES.map((v) => v.body)))];
const conditions = ['all', 'New', 'Elite Approved'];
return (
Inventory · Live Feed Snapshot
Fine collection of new and pre-owned luxury cars.
{VEHICLES.length} vehicles in this snapshot · POA pricing · all stock viewable by appointment at our showrooms.
{/* filters */}
setFilters({ ...filters, make: v })} options={makes} />
setFilters({ ...filters, body: v })} options={bodies} />
setFilters({ ...filters, condition: v })} options={conditions} />
setFilters({ ...filters, sort: v })} options={['newest', 'oldest', 'mileage']} compact />
{['grid', 'list'].map((v) => (
setView(v)} style={{
padding: '8px 14px', fontFamily: 'var(--font-mono)', fontSize: 10, letterSpacing: '.14em', textTransform: 'uppercase',
background: view === v ? 'var(--text)' : 'transparent', color: view === v ? 'var(--bg)' : 'var(--text-dim)',
}}>{v}
))}
{view === 'grid' ? (
{filtered.map((v) => (
go('vehicle', id)} locale={locale} />
))}
) : (
{filtered.map((v) => (
go('vehicle', id)} />
))}
)}
);
}
function FilterChip({ label, value, onChange, options, compact }) {
return (
{label}
{options.map((o) => (
onChange(o)} style={{
padding: compact ? '4px 8px' : '5px 11px',
fontFamily: 'var(--font-mono)', fontSize: 10, letterSpacing: '.12em', textTransform: 'uppercase',
border: '1px solid ' + (value === o ? 'var(--accent)' : 'var(--line)'),
color: value === o ? 'var(--accent)' : 'var(--text-dim)',
background: value === o ? 'color-mix(in srgb, var(--accent) 8%, transparent)' : 'transparent',
transition: 'all .2s', cursor: 'pointer',
}}>
{o === 'all' ? 'All' : o}
))}
);
}
function InventoryRow({ v, onOpen }) {
return (
onOpen(v.id)}
style={{
display: 'grid', gridTemplateColumns: '220px 1.5fr 1fr 1fr auto', gap: 32, alignItems: 'center',
padding: '20px 24px', borderTop: '1px solid var(--line)', cursor: 'pointer',
transition: 'background .2s',
}}
onMouseEnter={(e) => (e.currentTarget.style.background = 'var(--surface)')}
onMouseLeave={(e) => (e.currentTarget.style.background = 'transparent')}
>
{v.year} · {v.body} · {v.stock}
{v.make} {v.model} {v.trim}
Mileage
{v.mileage.toLocaleString()} km
);
}
/* ============================================================
VEHICLE DETAIL — flagship
============================================================ */
function ScreenVehicle({ id, go, openLead, locale }) {
const t = I18N[locale];
const v = useMemoS(() => VEHICLES.find((x) => x.id === id) || VEHICLES[0], [id]);
const [activePhoto, setActivePhoto] = useStateS(0);
const others = VEHICLES.filter((x) => x.id !== v.id).slice(0, 4);
return (
{/* ===== CINEMATIC HERO ===== */}
{/* breadcrumb */}
{/* gallery */}
{v.certified && (
Elite Approved · 320-Point Certified
)}
{activePhoto + 1} / {v.photos.length} · Stock {v.stock}
{/* thumbs */}
{v.photos.map((p, i) => (
setActivePhoto(i)} style={{
width: 96, height: 64, padding: 0, overflow: 'hidden',
border: '1px solid ' + (i === activePhoto ? 'var(--accent)' : 'var(--line)'),
opacity: i === activePhoto ? 1 : .55, transition: 'all .2s',
}}>
))}
{/* details panel */}
{v.category} · {v.condition}
{v.year} {v.make}{v.model}
{v.trim}
{t.poa}
POA
Price disclosed on enquiry. Finance & trade-in available.
{/* primary CTAs */}
openLead({ kind: 'price', vehicle: v })}>
{t.request}
openLead({ kind: 'viewing', vehicle: v })}>
{t.book}
openLead({ kind: 'tradein', vehicle: v })}>{t.tradeIn}
openLead({ kind: 'finance', vehicle: v })}>{t.finance}
WhatsApp this car
{/* concierge note */}
Concierge response within 2 business hours. All inspections at our Dubai service centre. International export available.
{/* ===== SUMMARY + HIGHLIGHTS ===== */}
Highlights
{v.highlights.map((h, i) => (
{h}
))}
{/* ===== SPEC TABLE ===== */}
Technical specification
Source · Live feed · Verified by Elite Approved
{[
['Year', v.year],
['Body', v.body],
['Mileage', `${v.mileage.toLocaleString()} km`],
['Stock', v.stock],
['Engine', v.engine],
['Transmission', v.transmission],
['Drivetrain', v.drivetrain],
['Seats', v.seats],
['Power', v.power],
['Torque', v.torque],
['Exterior', v.exterior],
['Interior', v.interior],
].map(([k, val]) => (
{k}
{val}
))}
{/* ===== APPROVED BAND ===== */}
{v.certified && (
Elite Approved Certificate
This vehicle has passed the 320-point Elite Approved technical inspection. Inspection report available on request.
View Inspection Report
)}
{/* ===== SIMILAR ===== */}
You may also consider
go('inventory')}>All inventory
{others.map((o) => (
go('vehicle', id)} locale={locale} />
))}
);
}
/* ============================================================
SERVICES
============================================================ */
function ScreenServices({ openLead }) {
const services = [
{ eyebrow: '01', title: 'Specialised service centre', body: 'Marque-trained technicians, lift bays, and diagnostic equipment for every brand we sell.', img: 'media/service-bay-2.webp' },
{ eyebrow: '02', title: 'Genuine spare parts', body: 'OEM parts inventory and direct supply lines from manufacturers — fitted in-house.', img: 'media/showroom-2.webp' },
{ eyebrow: '03', title: 'Customisation', body: 'Tailored detailing, paint protection, interior re-trims, and bespoke options.', img: 'media/gal-show-3.webp' },
{ eyebrow: '04', title: 'Warranty & service packages', body: 'Tailored cover for new and Elite Approved vehicles — by enquiry.', img: 'media/gal-customer.webp' },
];
return (
After-Sales
Ownership, handled .
From first enquiry to final handover — and every service interval after.
{services.map((s) => (
{s.eyebrow}
{s.title}
{s.body}
openLead({ kind: 'enquire' })}>Enquire
))}
);
}
/* ============================================================
EXPORT
============================================================ */
function ScreenExport({ openLead }) {
return (
Worldwide Export · RU · ZH · AR · EN
We export luxury cars worldwide .
With strong worldwide shipping capabilities, The Elite Cars delivers exotic and luxury vehicles to buyers across the globe.
openLead({ kind: 'export' })}>Start an Export Enquiry
{[
['Buyer locale', 'EN · AR · RU · ZH'],
['Documentation', 'Customs · Shipping · Title'],
['Channels', 'Sea · Air · Land · By enquiry'],
['Verification', 'Inspection report · VIN · History'],
].map(([k, v]) => (
))}
);
}
/* ============================================================
CONTACT
============================================================ */
function ScreenContact({ openLead }) {
return (
Visit · Concierge · WhatsApp
Find a showroom .
Two Dubai showrooms, plus Sharjah and an Abu Dhabi flagship — open 7 days, concierge by appointment.
{SHOWROOMS.map((s) => (
{s.badge && (
{s.badge}
)}
Address {s.address}
Hours {s.hours}
Phone 800-ELITE-CARS · 800 35483 2277
openLead({ kind: 'viewing' })}>Book Viewing
WhatsApp
))}
);
}
Object.assign(window, { ScreenHome, ScreenInventory, ScreenVehicle, ScreenServices, ScreenExport, ScreenContact });