// Main App — routing + tweaks integration const { useState: useStateApp, useEffect: useEffectApp } = React; const TWEAK_DEFAULTS = /*EDITMODE-BEGIN*/{ "palette": "oasis", "displayFont": "serif" }/*EDITMODE-END*/; function App() { const [route, setRouteState] = useStateApp({ page: "home" }); const [tweaks, setTweak] = (window.useTweaks || (() => [TWEAK_DEFAULTS, () => {}]))(TWEAK_DEFAULTS); // Scroll to top whenever the route changes useEffectApp(() => { window.scrollTo({ top: 0, behavior: "auto" }); }, [route.page, route.slug]); // Apply palette + font tweaks as CSS variables on :root useEffectApp(() => { const root = document.documentElement; const palettes = { oasis: { oasis: "#1f7fb8", deep: "#0c3a5c", ink: "#114a73", leaf: "#5aab3f", leafD: "#3f8a26" }, lagoon: { oasis: "#16a3a3", deep: "#0a4747", ink: "#0d6e6e", leaf: "#f0a23d", leafD: "#c88018" }, sand: { oasis: "#27567a", deep: "#1a3a55", ink: "#1f4869", leaf: "#c5915e", leafD: "#9b6f3e" }, }; const p = palettes[tweaks.palette] || palettes.oasis; root.style.setProperty("--oasis", p.oasis); root.style.setProperty("--oasis-deep", p.deep); root.style.setProperty("--oasis-ink", p.ink); root.style.setProperty("--leaf", p.leaf); root.style.setProperty("--leaf-deep", p.leafD); const fonts = { serif: '"Instrument Serif", Georgia, serif', grotesk: '"Bricolage Grotesque", "Manrope", sans-serif', mono: '"JetBrains Mono", ui-monospace, monospace', }; root.style.setProperty("--f-display", fonts[tweaks.displayFont] || fonts.serif); }, [tweaks.palette, tweaks.displayFont]); // Tweaks panel const TweaksUI = () => { if (!window.TweaksPanel) return null; const TP = window.TweaksPanel; const TS = window.TweakSection; const TR = window.TweakRadio; return ( setTweak("palette", v)} /> setTweak("displayFont", v)} /> ); }; let body; switch (route.page) { case "home": body = ; break; case "services": body = ; break; case "service": body = ; break; case "diagnostics": body = ; break; case "team": body = ; break; case "vet": body = ; break; case "about": body = ; break; case "emergency": body = ; break; case "contact": body = ; break; default: body = ; } return ( {body}