/* ELUCENS app — shell: monogram, sidebar, topbar */ const { Icon } = window; function Mono({ size = 21, tile = false, tileSize, bg = '#0A312E', radius = 10 }) { const m = E; if (!tile) return m; const ts = tileSize || size * 1.8; return {m}; } function Wordmark({ size = 23, dark = true }) { return Elucens; } function Sidebar({ view, setView, t, lang, navOpen, onClose }) { const nav = (id) => { setView(id); if (onClose) onClose(); }; const item = (id, icon, label, opts = {}) => ( ); return ( ); } const CRUMBS = { overview: ['Overzicht'], ask: ['Vraag Elucens'], integrations: ['Data', 'Integraties'], actions: ['Acties'], result: ['Resultaat'], calls: ['Gesprekken'], email: ['Jouw pakket', 'E-mailtriage'], quotes: ['Jouw pakket', 'Offerte-automatisering'], invoicing: ['Jouw pakket', 'Facturatiekoppeling'], crm: ['Jouw pakket', 'CRM'], forecast: ['Jouw pakket', 'Voorraadprognose'], settings: ['Instellingen'], }; // Real notifications come from the backend (bootstrap.notifs); empty until wired. const NOTIFS = (typeof window !== 'undefined' && window.__ELUCENS_BOOTSTRAP__ && window.__ELUCENS_BOOTSTRAP__.notifs) || []; function Topbar({ view, t, lang, setLang, theme, setTheme, onSearch, onMenu }) { const crumbs = CRUMBS[view] || ['Overzicht']; const [notifOpen, setNotifOpen] = React.useState(false); const [seen, setSeen] = React.useState(false); const unread = seen ? 0 : NOTIFS.filter(n => n.unread).length; const isDark = theme === 'dark'; return (
{TENANT.short} {crumbs.map((c, i) => ( {i === crumbs.length - 1 ? {c} : {c}} ))}
{['nl', 'en'].map(l => ( ))}
{notifOpen && (
setNotifOpen(false)}>
Meldingen
{NOTIFS.length === 0 && (
Geen nieuwe meldingen.
)} {NOTIFS.map((n, i) => (
{n.t}
{n.m}
{n.unread && !seen && }
))}
)}
); } Object.assign(window, { Mono, Wordmark, Sidebar, Topbar });