import { appPath } from "@agent-native/core/client/api-path"; import { DevDatabaseLink } from "@agent-native/core/client/db-admin"; import { LanguagePicker, useT } from "@agent-native/core/client/i18n"; import { openCommandMenu } from "@agent-native/core/client/navigation"; import { OrgSwitcher } from "@agent-native/core/client/org"; import { FeedbackButton } from "@agent-native/core/client/ui"; import { SidebarFooterActions } from "@agent-native/toolkit/app-shell"; import { IconStack2, IconPalette, IconSettings, IconLayoutSidebarLeftCollapse, IconLayoutSidebarLeftExpand, IconSearch, } from "@tabler/icons-react"; import { Link, useLocation } from "react-router"; import { Tooltip, TooltipContent, TooltipTrigger, } from "@/components/ui/tooltip"; import { cn } from "@/lib/utils"; const navItems = [ { icon: IconStack2, labelKey: "navigation.decks", href: "/" }, { icon: IconPalette, labelKey: "navigation.designSystems", href: "/design-systems", }, ]; const bottomNavItems = [ { icon: IconSettings, labelKey: "navigation.settings", href: "/settings" }, ]; interface SidebarProps { collapsed: boolean; /** Omit to hide the collapse/expand toggle (e.g. inside the mobile drawer, * where toggling the desktop preference is meaningless). */ onToggleCollapsed?: () => void; } export function Sidebar({ collapsed, onToggleCollapsed }: SidebarProps) { const location = useLocation(); const t = useT(); const isItemActive = (href: string) => href === "/" ? location.pathname === "/" : location.pathname.startsWith(href); const collapseButton = onToggleCollapsed ? ( {collapsed ? t("sidebar.expandSidebar") : t("sidebar.collapseSidebar")} ) : null; const searchButton = ( {t("root.searchDecks")} ); const translateButton = ( ); const feedbackButton = ( ); if (collapsed) { return ( ); } return ( ); }