// ============================================================================ // public/shell/sidebar.jsx — App sidebar with USER_NAV + ADMIN_NAV // ---------------------------------------------------------------------------- // Uses the navigation config from app.jsx (USER_NAV / ADMIN_NAV) and the // session context (current user, tenant, role) to render: // • Brand mark // • View switch (User ↔ Admin) — only shown if user has admin access // • Nav sections + items // • User pill at the bottom (avatar, name, email, logout) // • Collapse toggle // ============================================================================ function Sidebar({ nav, route, go, view, setView, collapsed, setCollapsed, session, onLogout, canSwitchToAdmin }) { const user = session?.user; const tenant = session?.tenant; return ( ); } window.Sidebar = Sidebar;