/* eslint-disable */ // APP — hash router + tweaks panel wiring const ROUTES = { '' : { key: 'home', title: 'Platinum Black — DIFC, Dubai', render: (p) => }, 'services' : { key: 'services', title: 'Services · Platinum Black', render: () => }, 'memberships': { key: 'memberships', title: 'Memberships & Offers · Platinum Black', render: () => }, 'about' : { key: 'about', title: 'About · Platinum Black', render: () => }, 'reviews' : { key: 'reviews', title: 'Reviews · Platinum Black', render: () => }, 'book' : { key: 'book', title: 'Book · Platinum Black', render: () => }, 'contact' : { key: 'contact', title: 'Contact · Platinum Black', render: () => }, }; function getRoute() { const routed = (window.__BYTESGLUE_SHOWCASE_ROUTE || '').toLowerCase(); const fallbackHash = routed && routed !== 'home' ? `#/${routed}` : '#/'; const h = (location.hash || fallbackHash).replace(/^#\/?/, '').toLowerCase(); return ROUTES[h] ? h : ''; } // Tiny color helper for accent → accent-deep function darken(hex, amt) { if (!hex || hex[0] !== '#') return hex; let h = hex.slice(1); if (h.length === 3) h = h.split('').map(c=>c+c).join(''); const num = parseInt(h, 16); let r = (num >> 16) & 255, g = (num >> 8) & 255, b = num & 255; r = Math.max(0, Math.round(r * (1 - amt))); g = Math.max(0, Math.round(g * (1 - amt))); b = Math.max(0, Math.round(b * (1 - amt))); return '#' + [r,g,b].map(v => v.toString(16).padStart(2,'0')).join(''); } function App() { const [route, setRoute] = React.useState(getRoute()); const TWEAK_DEFAULTS = /*EDITMODE-BEGIN*/{ "palette": "ivory", "accent": "#C8A86B", "density": "comfortable", "heroVariant": "split" }/*EDITMODE-END*/; const [tweaks, setTweak] = useTweaks(TWEAK_DEFAULTS); // Apply palette + density + accent to body / root React.useEffect(() => { document.body.setAttribute('data-mode', tweaks.palette === 'black' ? 'black' : 'ivory'); document.body.setAttribute('data-density', tweaks.density); document.documentElement.style.setProperty('--accent', tweaks.accent); document.documentElement.style.setProperty('--accent-deep', darken(tweaks.accent, 0.18)); }, [tweaks.palette, tweaks.density, tweaks.accent]); // Hash routing React.useEffect(() => { function onHash() { setRoute(getRoute()); window.scrollTo(0, 0); } window.addEventListener('hashchange', onHash); return () => window.removeEventListener('hashchange', onHash); }, []); React.useEffect(() => { document.title = (ROUTES[route] || ROUTES['']).title; }, [route]); const r = ROUTES[route] || ROUTES['']; return ( <>
{r.render({ heroVariant: tweaks.heroVariant })}