import { Users, Award, Settings, HardDrive, Radio, FileText, Bell, } from 'lucide-react'; import { usePublicSettings } from '@/react/portainer/settings/queries'; import { isBE } from '@/react/portainer/feature-flags/feature-flags.service'; import { SidebarItem } from './SidebarItem'; import { SidebarSection } from './SidebarSection'; import { SidebarParent } from './SidebarItem/SidebarParent'; interface Props { isPureAdmin: boolean; isAdmin: boolean; isTeamLeader?: boolean; } export function SettingsSidebar({ isPureAdmin, isAdmin, isTeamLeader }: Props) { const teamSyncQuery = usePublicSettings({ select: (settings) => settings.TeamSync, }); const isPureAdminOrTeamLeader = isPureAdmin || (isTeamLeader && !teamSyncQuery.data && !isAdmin); const showUsersSection = !window.ddExtension && isPureAdminOrTeamLeader; return ( {showUsersSection && ( {isPureAdmin && ( )} )} {isPureAdmin && ( <> {isBE && ( )} )} {isBE && !isPureAdmin && isAdmin && ( )} {isPureAdmin && ( {!window.ddExtension && ( )} {isBE && ( )} Help / About )} ); } function EdgeUpdatesSidebarItem() { const settingsQuery = usePublicSettings(); if (!isBE || !settingsQuery.data?.EnableEdgeComputeFeatures) { return null; } return ( ); }