/* global React */
const { useState, useEffect, useRef } = React;
// ---------- TWEAK DEFAULTS (shared, mirrored across pages) ----------
const TWEAK_DEFAULTS = /*EDITMODE-BEGIN*/{
"accent": "#2A3FA0",
"dark": false,
"showKeenDigital": true
}/*EDITMODE-END*/;
function useTheme(tweaks) {
useEffect(() => {
const root = document.documentElement;
root.style.setProperty('--brand', tweaks.accent);
root.style.setProperty('--brand-soft', tweaks.accent + '22');
root.style.setProperty('--brand-line', tweaks.accent + '55');
root.dataset.theme = tweaks.dark ? 'dark' : 'light';
}, [tweaks.accent, tweaks.dark]);
}
function useInView(threshold = 0.15) {
const ref = useRef(null);
const [inView, setInView] = useState(false);
useEffect(() => {
if (!ref.current) return;
const obs = new IntersectionObserver(([e]) => {
if (e.isIntersecting) { setInView(true); obs.disconnect(); }
}, { threshold });
obs.observe(ref.current);
return () => obs.disconnect();
}, []);
return [ref, inView];
}
function TopBar({ active }) {
const links = [
['Platform', 'Platform.html'],
['Ordering', 'Ordering.html'],
['Intelligence', 'Intelligence.html'],
['Operations', 'Operations.html'],
['Launcher', 'Launcher.html'],
['White-label', 'WhiteLabel.html'],
['Why us', 'WhyUs.html'],
];
return (
{lede} {lede}{title}
{lede && {title}
{lede &&
{points.map(([k, v]) => (
)}
{children}