/* Superior Car Rental — Main App with router state + Tweaks */ const { useState: useStateApp, useEffect: useEffectApp } = React; const TWEAK_DEFAULTS = /*EDITMODE-BEGIN*/{ "accent": "#F2A916", "density": "regular", "lightHero": false, "showRibbon": true, "cardShape": "rounded" }/*EDITMODE-END*/; const ACCENT_PALETTES = { "#F2A916": { name: "Brand gold", ink: "#0A0C0F" }, // matches actual logo "#C1121F": { name: "Rosso", ink: "#FFFFFF" }, // sportier alt "#B7D3E8": { name: "Ice", ink: "#0A0C0F" }, // cool editorial "#B0904E": { name: "Champagne", ink: "#0A0C0F" } // muted brand spec }; function App() { const [route, setRoute] = useStateApp({ name: "home" }); const [reservationCtx, setReservationCtx] = useStateApp(null); const [completed, setCompleted] = useStateApp(null); const [t, setTweak] = useTweaks(TWEAK_DEFAULTS); // Apply accent useEffectApp(() => { const ink = ACCENT_PALETTES[t.accent]?.ink || "#0A0C0F"; document.documentElement.style.setProperty("--accent", t.accent); document.documentElement.style.setProperty("--accent-ink", ink); // Card shape document.documentElement.style.setProperty("--radius-lg", t.cardShape === "sharp" ? "0px" : t.cardShape === "softer" ? "10px" : "4px"); document.documentElement.style.setProperty("--radius", t.cardShape === "sharp" ? "0px" : "2px"); }, [t.accent, t.cardShape]); const navigate = (r) => setRoute(r); const openReserve = (ctx) => setReservationCtx(ctx); const closeReserve = () => setReservationCtx(null); const finishReserve = (data) => { setReservationCtx(null); setCompleted(data); setRoute({ name: "confirmation" }); }; // Pick nav variant: dark by default; light on light-bg routes if needed. const navLight = false; let main; switch (route.name) { case "home": main = ; break; case "fleet": main = ; break; case "car": main = ; break; case "chauffeur": main = ; break; case "about": main = ; break; case "how": main = ; break; case "contact": main = ; break; case "brands": main = ; break; case "confirmation": main = ; break; default: main = ; } return ( <>