import type { ReactNode } from 'react'; import { Command } from '@/components/ui/command'; import { ScrollArea } from '@/components/ui/scroll-area'; import type { NotificationItem } from '@/components/dashboard/types'; import { SidebarActions } from './SidebarActions'; import { SidebarActivityTicker } from './SidebarActivityTicker'; import { SidebarBrand } from './SidebarBrand'; import { SidebarBulkBar } from './SidebarBulkBar'; import { SidebarFilterChips, type FilterCounts } from './SidebarFilterChips'; import { SidebarSearch } from './SidebarSearch'; import { StackList, type StackListProps } from './StackList'; import type { FilterChip } from './sidebar-types'; import type { BulkAction } from '@/hooks/useBulkStackActions'; export interface StackSidebarProps { isDarkMode: boolean; nodeSwitcherSlot: ReactNode; createStackSlot: ReactNode | null; onScan: () => void; isScanning: boolean; canCreate: boolean; searchQuery: string; onSearchChange: (v: string) => void; filterChip: FilterChip; filterCounts: FilterCounts; onFilterChipChange: (chip: FilterChip) => void; list: StackListProps; notifications: NotificationItem[]; tickerConnected: boolean; onOpenActivity: () => void; bulkMode: boolean; selectedFiles: Set; isPaid: boolean; onToggleBulkMode: () => void; onToggleSelect: (file: string) => void; onClearSelection: () => void; onBulkAction: (action: BulkAction) => void; } export function StackSidebar(props: StackSidebarProps) { const { isDarkMode, nodeSwitcherSlot, createStackSlot, onScan, isScanning, canCreate, searchQuery, onSearchChange, filterChip, filterCounts, onFilterChipChange, list, notifications, tickerConnected, onOpenActivity, bulkMode, selectedFiles, isPaid, onToggleBulkMode, onToggleSelect, onClearSelection, onBulkAction, } = props; return (
{nodeSwitcherSlot}
{canCreate && createStackSlot !== null && ( )} {selectedFiles.size > 0 && ( )}
); }