// Shell — Sidebar + Topbar const { useState: useStateShell } = React; const NAV_TREE = [ { type: "item", id: "dashboard", label: "Dashboard", icon: "home" }, { type: "group", label: "Live" }, { type: "item", id: "live-planejamento", label: "Planejamento", icon: "cake", badge: { text: "3", kind: "muted" } }, { type: "item", id: "live-apresentar", label: "Apresentar", icon: "live", badge: { text: "AO VIVO", kind: "accent" } }, { type: "item", id: "live-pedidos", label: "Pedidos", icon: "list", badge: { text: "47" } }, { type: "item", id: "live-bag", label: "Bag", icon: "bag", badge: { text: "4", kind: "muted" } }, { type: "item", id: "live-sortear", label: "Sortear", icon: "gift" }, { type: "group", label: "Loja" }, { type: "item", id: "loja-pdv", label: "Caixa (PDV)", icon: "store" }, { type: "item", id: "loja-crediario", label: "Crediário", icon: "dollar", badge: { text: "6", kind: "muted" } }, { type: "item", id: "loja-financeiro", label: "Financeiro", icon: "chart" }, { type: "group", label: "Site" }, { type: "item", id: "site-pedidos", label: "Pedidos e-com", icon: "site", badge: { text: "12", kind: "muted" } }, { type: "item", id: "site-carrinhos", label: "Carrinhos", icon: "cart", badge: { text: "4" } }, { type: "group", label: "Catálogo & CRM" }, { type: "item", id: "produtos", label: "Produtos", icon: "package" }, { type: "item", id: "clientes", label: "Clientes", icon: "users" }, { type: "group", label: "Inteligência" }, { type: "item", id: "disparo", label: "Disparo em massa", icon: "send", badge: { text: "novo", kind: "accent" } }, { type: "item", id: "marketing", label: "Marketing", icon: "megaphone" }, { type: "item", id: "relatorios", label: "Relatórios", icon: "layers" }, { type: "group", label: "Sistema" }, { type: "item", id: "config", label: "Configurações", icon: "settings" }, ]; const CRUMBS = { "dashboard": ["Dashboard"], "live-planejamento": ["Live", "Planejamento"], "live-apresentar": ["Live", "Apresentar"], "live-pedidos": ["Live", "Pedidos"], "live-bag": ["Live", "Bag"], "live-sortear": ["Live", "Sortear"], "loja-pdv": ["Loja", "Caixa (PDV)"], "loja-crediario": ["Loja", "Crediário"], "loja-financeiro": ["Loja", "Financeiro"], "site-pedidos": ["Site", "Pedidos da loja virtual"], "site-carrinhos": ["Site", "Carrinhos abandonados"], "produtos": ["Produtos"], "clientes": ["Clientes"], "disparo": ["Inteligência", "Disparo em massa"], "marketing": ["Marketing"], "relatorios": ["Relatórios"], "config": ["Configurações"], }; const Sidebar = ({ route, setRoute }) => ( ); const Topbar = ({ route }) => { const crumbs = CRUMBS[route] || ["—"]; return (
{crumbs.map((c, i) => ( {i > 0 && /} {c} ))}
Ver loja virtual
⌘K
); }; Object.assign(window, { Sidebar, Topbar, NAV_TREE, CRUMBS });