import { useIsDarkTheme, useTheme } from '@/components/theme-provider'; import { Button } from '@/components/ui/button'; import { Label } from '@/components/ui/label'; import { Switch } from '@/components/ui/switch'; import { ProfileSettingRouteKey } from '@/constants/setting'; import { useSecondPathName } from '@/hooks/route-hook'; import { cn } from '@/lib/utils'; import { AlignEndVertical, Banknote, Box, FileCog, LayoutGrid, LogOut, User, } from 'lucide-react'; import { useCallback } from 'react'; import { useHandleMenuClick } from './hooks'; const menuItems = [ { section: 'Account & collaboration', items: [ { icon: User, label: 'Profile', key: ProfileSettingRouteKey.Profile }, { icon: LayoutGrid, label: 'Team', key: ProfileSettingRouteKey.Team }, { icon: Banknote, label: 'Plan', key: ProfileSettingRouteKey.Plan }, ], }, { section: 'System configurations', items: [ { icon: Box, label: 'Model management', key: ProfileSettingRouteKey.Model, }, { icon: FileCog, label: 'Prompt management', key: ProfileSettingRouteKey.Prompt, }, { icon: AlignEndVertical, label: 'Chunking method', key: ProfileSettingRouteKey.Chunk, }, ], }, ]; export function SideBar() { const pathName = useSecondPathName(); const { handleMenuClick } = useHandleMenuClick(); const { setTheme } = useTheme(); const isDarkTheme = useIsDarkTheme(); const handleThemeChange = useCallback( (checked: boolean) => { setTheme(checked ? 'dark' : 'light'); }, [setTheme], ); return ( ); }