// mb-shell.jsx — app chrome: TabBar, bottom Sheet, top header const TABS = [ { id: "home", label: "Home", icon: "home" }, { id: "descobrir", label: "Explorar",icon: "map" }, { id: "blog", label: "Blog", icon: "book" }, { id: "shop", label: "Lojas", icon: "search" }, { id: "perfil", label: "Perfil", icon: "user" }, ]; function TabBar({ tab, onTab, cartCount }) { return (
{TABS.map(t => { const on = tab === t.id; return ( ); })}
); } // Bottom sheet function Sheet({ open, onClose, children, title, maxH = "80%" }) { const [mounted, setMounted] = React.useState(open); React.useEffect(() => { if (open) setMounted(true); else { const t = setTimeout(() => setMounted(false), 280); return () => clearTimeout(t); } }, [open]); if (!mounted) return null; return (
{title && (

{title}

)}
{children}
); } // Full-screen pushed view (store, product, checkout...) sliding from right // Termina em bottom: TAB_H para que a barra de navegação fique sempre visível. // Os CTAs fixos (position:absolute, bottom:0) dentro das telas ficam naturalmente // logo acima do menu, e as áreas roláveis já têm paddingBottom: TAB_H. const _PUSHED_BOTTOM = (typeof TAB_H !== "undefined") ? TAB_H : "72px"; function Pushed({ open, children }) { return (
{children}
); } // Generic top bar for pushed views (overlaps content, glass) function TopBar({ title, onBack, right, transparent }) { return (
{title &&

{title}

} {!title &&
} {right}
); } Object.assign(window, { TABS, TabBar, Sheet, Pushed, TopBar });