import { Bell, Home, KeyRound, LayoutDashboard, LogOut, Package, Settings, Users, Workflow, } from "lucide-react" import { Logo } from "@/components/Common/Logo" import { Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarTrigger, } from "@/components/ui/sidebar" import useAuth from "@/hooks/useAuth" import { type Item, Main } from "./Main" const baseItems: Item[] = [ // "Home" rather than "Dashboard": dashboards are their own thing now. { icon: Home, title: "Home", path: "/" }, { icon: Workflow, title: "Flows", path: "/flows" }, { icon: LayoutDashboard, title: "Dashboards", path: "/dashboards" }, // Both are engine-wide operator settings rather than personal ones, so they // sit here and not among the per-user tabs under Settings. { icon: KeyRound, title: "Secrets", path: "/secrets" }, { icon: Package, title: "Modules", path: "/modules" }, { icon: Bell, title: "Alerts", path: "/alerts" }, ] export function AppSidebar() { const { user: currentUser, logout } = useAuth() const items = currentUser?.is_superuser ? [...baseItems, { icon: Users, title: "Admin", path: "/admin" }] : baseItems const footerItems: Item[] = [ { icon: Settings, title: "Settings", path: "/settings" }, { icon: LogOut, title: "Log Out", onClick: logout }, ] return ( // Floating frosted chrome over whatever surface the shell paints; see the // root DESIGN-GUIDELINES.md → Shells and → Overlay surfaces & content chips.
{/* Collapsed, the rail has room for one thing, and that is the way back out. */} {/* On a phone the sidebar is a sheet with its own way in and out. */}
{/* Main already pads horizontally; the footer only adds the bottom gap. */}
) } export default AppSidebar