/* Centaurus Charter — UI components */
const { useState, useEffect, useRef } = React;
/* === Icons === */
const Icon = {
arrow: (p) => ,
back: (p) => ,
cal: (p) => ,
guests: (p) => ,
pin: (p) => ,
check: (p) => ,
wa: (p) => ,
play: (p) => ,
close: (p) => ,
star: (p) => ,
};
/* === Logo (inline SVG from the official artwork) === */
function LogoMark({ color = 'navy', compact = false }) {
const navy = color === 'navy' ? 'var(--navy)' : '#fff';
const gold = 'var(--gold)';
return (
);
}
/* === Nav === */
function Nav({ screen, goto, dark, lang, setLang, onBook }) {
const links = [
['home', 'Home'],
['fleet', 'Fleet'],
['experiences', 'Experiences'],
['destinations', 'Route Ideas'],
['watersports', 'Water Sports'],
['about', 'About'],
['contact', 'Contact'],
];
return (
);
}
/* === Booking strip (under hero) === */
function BookingStrip({ onSubmit }) {
const [pickedYacht, setPickedYacht] = useState('Any yacht');
return (
onSubmit('check')}>
Yacht
{pickedYacht}
Duration
3 hours · min. 3hr
);
}
/* === Trust strip === */
function TrustRow() {
const { TRUST } = window.CENTAURUS_DATA;
return (
{TRUST.map((t, i) => (
{t.num}{t.em}
{t.label}
{t.value}
{t.src}
))}
);
}
/* === Yacht card === */
function YachtCard({ y, onOpen, onBook }) {
return (
onOpen(y.slug)}>
{y.tag &&
{y.tag}
}
{y.length} ft · {y.make}
{y.berth}
{y.name}
{y.length} ft
{y.guests} guests
AED {y.rate.toLocaleString()}from / hour · T&Cs
View
);
}
/* === Footer === */
function Footer({ goto }) {
return (
);
}
/* === WhatsApp FAB === */
function WhatsAppFab() {
return (
);
}
/* === Booking / Enquiry modal === */
function BookingModal({ open, onClose, prefillYacht }) {
if (!open) return null;
const yachts = window.CENTAURUS_DATA.FLEET;
return (
e.stopPropagation()} style={{ position:'relative' }}>
Check availability
Book in minutes
FareHarbor instant booking · pay-on-board · Visa · Mastercard · Tabby · Crypto.
);
}
/* === Lightbox === */
function Lightbox({ src, onClose }) {
if (!src) return null;
return (
);
}
Object.assign(window, {
Icon, LogoMark, Nav, BookingStrip, TrustRow, YachtCard, Footer, WhatsAppFab,
BookingModal, Lightbox,
});