import { SidebarNavItem } from "@app/components/SidebarNav"; import { build } from "@server/build"; import { Settings, Users, Link as LinkIcon, Waypoints, Combine, Fingerprint, KeyRound, TicketCheck, User, Globe, // Added from 'dev' branch MonitorUp, // Added from 'dev' branch Server, ReceiptText, CreditCard, Logs, SquareMousePointer, ScanEye, GlobeLock, Smartphone, Laptop, ChartLine } from "lucide-react"; export type SidebarNavSection = { // Added from 'dev' branch heading: string; items: SidebarNavItem[]; }; // Merged from 'user-management-and-resources' branch export const orgLangingNavItems: SidebarNavItem[] = [ { title: "sidebarAccount", href: "/{orgId}", icon: } ]; export const orgNavSections = (): SidebarNavSection[] => [ { heading: "sidebarGeneral", items: [ { title: "sidebarSites", href: "/{orgId}/settings/sites", icon: }, { title: "sidebarResources", icon: , items: [ { title: "sidebarProxyResources", href: "/{orgId}/settings/resources/proxy", icon: }, { title: "sidebarClientResources", href: "/{orgId}/settings/resources/client", icon: , isBeta: true } ] }, { title: "sidebarClients", icon: , isBeta: true, items: [ { href: "/{orgId}/settings/clients/user", title: "sidebarUserDevices", icon: }, { href: "/{orgId}/settings/clients/machine", title: "sidebarMachineClients", icon: } ] }, ...(build == "saas" ? [ { title: "sidebarRemoteExitNodes", href: "/{orgId}/settings/remote-exit-nodes", icon: , showEE: true } ] : []), { title: "sidebarDomains", href: "/{orgId}/settings/domains", icon: }, { title: "sidebarBluePrints", href: "/{orgId}/settings/blueprints", icon: } ] }, { heading: "access", items: [ { title: "sidebarUsers", icon: , items: [ { title: "sidebarUsers", href: "/{orgId}/settings/access/users", icon: }, { title: "sidebarInvitations", href: "/{orgId}/settings/access/invitations", icon: } ] }, { title: "sidebarRoles", href: "/{orgId}/settings/access/roles", icon: }, ...(build == "saas" ? [ { title: "sidebarIdentityProviders", href: "/{orgId}/settings/idp", icon: , showEE: true } ] : []), { title: "sidebarShareableLinks", href: "/{orgId}/settings/share-links", icon: } ] }, { heading: "sidebarLogsAndAnalytics", items: (() => { const logItems: SidebarNavItem[] = [ { title: "sidebarLogsRequest", href: "/{orgId}/settings/logs/request", icon: }, ...(build != "oss" ? [ { title: "sidebarLogsAccess", href: "/{orgId}/settings/logs/access", icon: }, { title: "sidebarLogsAction", href: "/{orgId}/settings/logs/action", icon: } ] : []) ]; const analytics = { title: "sidebarLogsAnalytics", href: "/{orgId}/settings/logs/analytics", icon: }; // If only one log item, return it directly without grouping if (logItems.length === 1) { return [analytics, ...logItems]; } // If multiple log items, create a group return [ analytics, { title: "sidebarLogs", icon: , items: logItems } ]; })() }, { heading: "sidebarOrganization", items: [ { title: "sidebarApiKeys", href: "/{orgId}/settings/api-keys", icon: }, ...(build == "saas" ? [ { title: "sidebarBilling", href: "/{orgId}/settings/billing", icon: } ] : []), ...(build == "saas" ? [ { title: "sidebarEnterpriseLicenses", href: "/{orgId}/settings/license", icon: } ] : []), { title: "sidebarSettings", href: "/{orgId}/settings/general", icon: } ] } ]; export const adminNavSections: SidebarNavSection[] = [ { heading: "sidebarAdmin", items: [ { title: "sidebarAllUsers", href: "/admin/users", icon: }, { title: "sidebarApiKeys", href: "/admin/api-keys", icon: }, { title: "sidebarIdentityProviders", href: "/admin/idp", icon: }, ...(build == "enterprise" ? [ { title: "sidebarLicense", href: "/admin/license", icon: } ] : []) ] } ];