/* WordPress mount: detect data-pya-page on #pya-root and render appropriate page component */ (function () { const rootEl = document.getElementById('pya-root'); if (!rootEl) return; const pageKey = rootEl.dataset.pyaPage || 'home'; const heroVideo = rootEl.dataset.pyaHeroVideo || (window.PYA_CONFIG && PYA_CONFIG.heroVideoUrl) || ''; if (heroVideo) window.PYA_HERO_VIDEO_URL = heroVideo; const pageMap = { 'home': window.HomePage, 'polarizados': window.PolarizadosPage, 'pelicula-seguridad': window.PeliculaSeguridadPage, 'ppf': window.PPFPage, 'wraps': window.WrapsPage, 'detailing': window.DetailingPage, 'accesorios': window.AccesoriosPage, 'nosotros': window.NosotrosPage, 'sedes': window.SedesPage, 'contacto': window.ContactoPage, }; const activeMap = { 'home': 'home', 'polarizados': 'servicios', 'pelicula-seguridad': 'servicios', 'ppf': 'servicios', 'wraps': 'servicios', 'detailing': 'servicios', 'accesorios': 'accesorios', 'nosotros': 'nosotros', 'sedes': 'sedes', 'contacto': 'contacto', }; const PageComponent = pageMap[pageKey] || window.HomePage; const active = activeMap[pageKey] || 'home'; function App() { window.useReveal(); window.useParallax(); return ( <>