import { useLayoutStore, type ActivityView } from '@/stores/useLayoutStore' import { useThemeStore } from '@/stores/useThemeStore' interface ActivityItem { view: ActivityView label: string } function ExplorerIcon() { return ( ) } function SearchIcon() { return ( ) } function ExtensionsIcon() { return ( ) } function SettingsIcon() { return ( ) } function MoonIcon() { return ( ) } function SunIcon() { return ( ) } const activities: ActivityItem[] = [ { view: 'explorer', label: 'Explorer' }, { view: 'search', label: 'Search' }, { view: 'extensions', label: 'Extensions' }, ] const bottomActivities: ActivityItem[] = [ { view: 'settings', label: 'Settings' }, ] const iconMap: Record = { explorer: ExplorerIcon, search: SearchIcon, extensions: ExtensionsIcon, settings: SettingsIcon, } function ActivityButton({ item, isActive, setActiveView }: { item: ActivityItem; isActive: boolean; setActiveView: (view: ActivityView | null) => void }) { const IconComponent = iconMap[item.view] || ExplorerIcon return ( setActiveView(item.view)} title={item.label} > {isActive && ( )} ) } export default function ActivityBar() { const activeView = useLayoutStore((s) => s.activeView) const setActiveView = useLayoutStore((s) => s.setActiveView) const theme = useThemeStore((s) => s.theme) const toggleTheme = useThemeStore((s) => s.toggleTheme) return ( {activities.map((item) => ( ))} {bottomActivities.map((item) => ( ))} {theme === 'dark' ? : } ) }