/* Shared navigation with mega-menu — used on all pages */
const { useState: useStateN, useEffect: useEffectN, useRef: useRefN } = React;
/* Catálogo compartido de iconos UI — estilo outline consistente. */
const MARTZ_ICONS = {
arrowRight: <> >,
check: ,
close: <> >,
info: <> >,
warning: <> >,
alert: <> >,
mail: <> >,
phone: ,
location: <> >,
clock: <> >,
shield: <> >,
};
const MartzIcon = ({ name, size = 18, className = '', strokeWidth = 1.8, label }) => (
{MARTZ_ICONS[name] || MARTZ_ICONS.info}
);
window.MartzIcon = MartzIcon;
const CONSENT_KEY = 'martz_cookie_consent';
const consentVersion = () => (window.MartzLegalConfig || {}).consentVersion || '1.0';
window.getCookieConsent = () => { try { const c=JSON.parse(localStorage.getItem(CONSENT_KEY)); return c&&c.version===consentVersion()?c:null; } catch(e){ return null; } };
window.saveCookieConsent = (choices) => { const c={necessary:true,preferences:!!choices.preferences,analytics:!!choices.analytics,marketing:!!choices.marketing,version:consentVersion(),consentedAt:new Date().toISOString()}; localStorage.setItem(CONSENT_KEY,JSON.stringify(c)); window.dispatchEvent(new CustomEvent('martz-consent-change',{detail:c})); return c; };
window.hasCookieConsent = category => category==='necessary' || !!(window.getCookieConsent()||{})[category];
window.resetCookieConsent = () => { localStorage.removeItem(CONSENT_KEY); window.dispatchEvent(new Event('martz-consent-reset')); };
window.openCookieSettings = () => window.dispatchEvent(new Event('martz-open-cookie-settings'));
window.ConsentGate = ({ category, children }) => window.hasCookieConsent(category) ? children : null;
const CookieConsent = () => {
const existing=window.getCookieConsent();
const [show,setShow]=useStateN(!existing), [modal,setModal]=useStateN(false);
const [prefs,setPrefs]=useStateN(existing||{necessary:true,preferences:false,analytics:false,marketing:false});
const dialogRef=useRefN(null), openerRef=useRefN(null);
const decide=p=>{window.saveCookieConsent(p);setShow(false);setModal(false)};
const open=()=>{openerRef.current=document.activeElement;const c=window.getCookieConsent();setPrefs(c||{necessary:true,preferences:false,analytics:false,marketing:false});setModal(true)};
const close=()=>{setModal(false);setTimeout(()=>openerRef.current&&openerRef.current.focus(),0)};
useEffectN(()=>{const fn=()=>open();window.addEventListener('martz-open-cookie-settings',fn);return()=>window.removeEventListener('martz-open-cookie-settings',fn)},[]);
useEffectN(()=>{const fn=()=>{setModal(false);setPrefs({necessary:true,preferences:false,analytics:false,marketing:false});setShow(true)};window.addEventListener('martz-consent-reset',fn);return()=>window.removeEventListener('martz-consent-reset',fn)},[]);
useEffectN(()=>{if(!modal)return;document.body.style.overflow='hidden';const d=dialogRef.current;const focusables=()=>[...d.querySelectorAll('button,input,a[href]')].filter(x=>!x.disabled);focusables()[0]?.focus();const key=e=>{if(e.key==='Escape')close();if(e.key==='Tab'){const f=focusables(),a=f[0],z=f[f.length-1];if(e.shiftKey&&document.activeElement===a){e.preventDefault();z.focus()}else if(!e.shiftKey&&document.activeElement===z){e.preventDefault();a.focus()}}};window.addEventListener('keydown',key);return()=>{document.body.style.overflow='';window.removeEventListener('keydown',key)}},[modal]);
const categories=[['necessary','Necesarias','Permiten funciones básicas y guardar tus preferencias.'],['preferences','Preferencias','Recuerdan opciones voluntarias para mejorar la experiencia.'],['analytics','Analíticas','Ayudarían a entender el uso del sitio. Actualmente no hay analítica instalada.'],['marketing','Marketing','Se usarían para publicidad. Actualmente no hay servicios publicitarios instalados.']];
return <>
{show&&Tu privacidad importa Utilizamos almacenamiento necesario para el funcionamiento del sitio. Con tu permiso, también podemos utilizar tecnologías opcionales para analizar el uso y mejorar la experiencia.
Ver política de cookies decide({})}>Rechazar opcionales Configurar decide({preferences:true,analytics:true,marketing:true})}>Aceptar todas
}
{modal&&
e.target===e.currentTarget&&close()}>
}
>;
};
const LanguageSwitcher = ({ mobile = false }) => {
const [language,setLanguage]=useStateN(window.MartzI18n ? window.MartzI18n.getLanguage() : 'es');
useEffectN(()=>{const fn=e=>setLanguage(e.detail.language);window.addEventListener('martz-language-change',fn);return()=>window.removeEventListener('martz-language-change',fn)},[]);
const choose=l=>{setLanguage(l);window.MartzI18n&&window.MartzI18n.setLanguage(l)};
return choose('es')}>ES / choose('en')}>EN
;
};
/* Base path: pages at /pages/ use '../' (default); pages nested deeper
(e.g. /pages/productos/) set window.MARTZ_BASE = '../../' before this script.
Existing pages keep the exact same links since MB falls back to '../'. */
const MB = (typeof window !== 'undefined' && window.MARTZ_BASE) ? window.MARTZ_BASE : '../';
const SiteNav = ({ current = 'home' }) => {
const [scrolled, setScrolled] = useStateN(false);
const [openMenu, setOpenMenu] = useStateN(null);
const [mobileOpen, setMobileOpen] = useStateN(false);
const navRef = useRefN(null);
const mobileRef = useRefN(null);
useEffectN(() => {
const onScroll = () => setScrolled(window.scrollY > 8);
window.addEventListener('scroll', onScroll);
return () => window.removeEventListener('scroll', onScroll);
}, []);
useEffectN(() => {
const onClick = (e) => {
if (navRef.current && !navRef.current.contains(e.target)) {
setOpenMenu(null);
setMobileOpen(false);
}
};
window.addEventListener('click', onClick);
return () => window.removeEventListener('click', onClick);
}, []);
// Close mobile menu on escape key
useEffectN(() => {
const onKey = (e) => {
if (e.key === 'Escape') setMobileOpen(false);
};
window.addEventListener('keydown', onKey);
return () => window.removeEventListener('keydown', onKey);
}, []);
// Lock body scroll when mobile menu is open
useEffectN(() => {
if (mobileOpen) {
document.body.style.overflow = 'hidden';
} else {
document.body.style.overflow = '';
}
return () => { document.body.style.overflow = ''; };
}, [mobileOpen]);
const Chev = () => (
);
const solutionsItems = [
{ href: `${MB}pages/soluciones.html#web`, t: 'Desarrollo Web', d: 'Sitios y landing pages de alto impacto', i: <> > },
{ href: `${MB}pages/soluciones.html#custom`, t: 'Software a medida', d: 'Plataformas SaaS y sistemas empresariales', i: <> > },
{ href: `${MB}pages/soluciones.html#auto`, t: 'Automatización', d: 'Workflows que liberan a tu equipo', i: <> > },
{ href: `${MB}pages/soluciones.html#ai`, t: 'IA aplicada', d: 'Asistentes y predicción para tu negocio', i: <> > },
{ href: `${MB}pages/soluciones.html#integ`, t: 'Integraciones', d: 'Conecta CRM, ERP, e-commerce', i: <> > },
{ href: `${MB}pages/soluciones.html#mant`, t: 'Mantenimiento IT', d: 'Soporte y evolución continua', i: <> > },
];
const productsItems = [
{ href: `${MB}pages/productos/martz-pos.html`, t: 'Martz POS', d: 'POS e inventario · desde $24.99/mes', i: <> > },
{ href: `${MB}pages/productos/martz-hospitality.html`, t: 'Martz Hospitality', d: 'Reservas y hotelería · próximamente', i: <> > },
{ href: `${MB}pages/productos/martz-health.html`, t: 'Martz Health', d: 'Clínicas y expedientes · próximamente', i: <> > },
];
const industriesItems = [
{ href: `${MB}pages/industrias.html#clinicas`, t: 'Clínicas y salud', d: 'Agenda, historiales, no-show', i: <> > },
{ href: `${MB}pages/industrias.html#restaurantes`, t: 'Restaurantes', d: 'Inventario, ventas, demanda', i: <> > },
{ href: `${MB}pages/industrias.html#empresas`, t: 'Empresas', d: 'ERP, integraciones, dashboards', i: <> > },
{ href: `${MB}pages/industrias.html#retail`, t: 'Retail & E-commerce', d: 'Multi-canal, stock, pricing', i: <> > },
];
const casosItems = [
{ href: `${MB}pages/casos.html#clinicas`, t: 'Clínica con sucursales', d: 'Agenda, expedientes e integraciones', i: <> > },
{ href: `${MB}pages/casos.html#restaurantes`, t: 'Cadena de restaurantes', d: 'Inventario, compras y automatización', i: <> > },
{ href: `${MB}pages/casos.html#empresas`, t: 'Sistemas desconectados', d: 'APIs, flujos y dashboard unificado', i: <> > },
{ href: `${MB}pages/casos.html#retail`, t: 'Comercio omnicanal', d: 'Canales, inventario y precios', i: <> > },
];
return (
Inicio
{ e.stopPropagation(); setOpenMenu(openMenu === 'sol' ? null : 'sol'); }}
>
Soluciones
{ e.stopPropagation(); setOpenMenu(openMenu === 'productos' ? null : 'productos'); }}
>
Productos SaaS
Proceso
{ e.stopPropagation(); setOpenMenu(openMenu === 'industrias' ? null : 'industrias'); }}
>
Industrias
{ e.stopPropagation(); setOpenMenu(openMenu === 'casos' ? null : 'casos'); }}
>
Casos
Nosotros
Contacto
Agendar demo
setMobileOpen(true)}
aria-label="Abrir menú"
type="button"
>
{/* Mobile Menu Overlay */}
);
};
/* ─── Redes sociales del footer ────────────────────────────────
Cuando crees cada cuenta, reemplaza el `url: '#'` por tu perfil real
(ej. url: 'https://www.instagram.com/martzlab'). Los que queden en
'#' siguen mostrando el icono pero sin enlazar a ningún lado. */
const SOCIALS = [
{ name: 'LinkedIn', url: 'http://linkedin.com/company/martz-forge', icon: <> > },
{ name: 'Instagram', url: 'https://www.instagram.com/martz_forge_/', icon: <> > },
{ name: 'Facebook', url: 'https://www.facebook.com/martzforgetech/', icon: },
{ name: 'WhatsApp', url: '#', icon: },
];
const SiteFooter = () => (
Software a medida que crece con tu negocio. Equipo independiente con base en LATAM.
{SOCIALS.map(s => {
const external = s.url && s.url !== '#';
return (
{s.icon}
);
})}
© 2026 martz forge. Todos los derechos reservados.
);
window.SiteNav = SiteNav;
window.SiteFooter = SiteFooter;