// ╔═══════════════════════════════════════════════════════════╗ // ║ KENSAI gokensai migration · Nav IA shell (FIFO 1, 05-36) ║ // ║ Self-contained IA shell rendered from window.KENSAI_NAV_IA ║ // ║ (generated from the approved 05-27 manifest). Desktop ║ // ║ dropdowns + mobile drawer. Preserves the existing landing ║ // ║ anchors; migrated section routes are foundation targets. ║ // ╚═══════════════════════════════════════════════════════════╝ // i18n (05-72): aria strings via t(); manifest-driven IA labels localize through the nav.labels // lookup (sanctioned fallback to the manifest original for unmapped labels — structural navigation). const t = window.t || ((k) => '⟪no-i18n:' + k + '⟫'); const navL = (label) => { const loc = window.__V4_I18N_LOCALE__ || 'en'; const map = (window.__V4_COPY__ && window.__V4_COPY__[loc] && window.__V4_COPY__[loc].nav && window.__V4_COPY__[loc].nav.labels) || {}; return map[label] || label; }; const NavIAShell = () => { const IA = (window.KENSAI_NAV_IA && Array.isArray(window.KENSAI_NAV_IA.nav)) ? window.KENSAI_NAV_IA.nav : []; const [open, setOpen] = React.useState(null); // label of the open desktop dropdown const [drawer, setDrawer] = React.useState(false); const [expanded, setExpanded] = React.useState(null); // mobile expanded section const hrefOf = (it) => it.route || it.anchor || (Array.isArray(it.dropdown) && it.dropdown[0] && it.dropdown[0].route) || '#'; // ── Desktop top-level item (link, or a dropdown trigger) ── const DesktopItem = (it) => { const hasDrop = Array.isArray(it.dropdown) && it.dropdown.length > 0; const isOpen = open === it.label; return (
hasDrop && setOpen(it.label)} onMouseLeave={() => hasDrop && setOpen(null)}> { e.currentTarget.style.color = 'var(--v4-text)'; e.currentTarget.style.borderBottom = '2px solid var(--v4-signal-line)'; }} onMouseLeave={e => { e.currentTarget.style.color = 'var(--v4-dim)'; e.currentTarget.style.borderBottom = '2px solid transparent'; }}> {navL(it.label)}{hasDrop ? : null} {hasDrop && isOpen && (
{it.dropdown.map(d => ( { e.currentTarget.style.color = 'var(--v4-text)'; e.currentTarget.style.background = 'var(--v4-bg-1)'; }} onMouseLeave={e => { e.currentTarget.style.color = 'var(--v4-dim)'; e.currentTarget.style.background = 'transparent'; }}> {navL(d.label)} {d.route} ))}
)}
); }; return ( ); }; Object.assign(window, { NavIAShell });