import { Download, MapPinned, Play, RefreshCw, Square } from 'lucide-react' import type React from 'react' export type ModuleFilter = 'all' | 'running' | 'stopped' | 'uninstalled' type ModuleListToolbarProps = { dark: boolean filter: ModuleFilter loading: boolean installingModuleName: string | null uninstalledCount: number runningCount: number stoppedCount: number onFilterChange: (filter: ModuleFilter) => void onInstallAll: () => void onStartAll: () => void onStopAll: () => void onOpenWorldEditor: () => void } const FILTER_TABS: Array<{ id: ModuleFilter; label: string }> = [ { id: 'all', label: '전체' }, { id: 'running', label: '실행중' }, { id: 'stopped', label: '정지됨' }, { id: 'uninstalled', label: '미설치' } ] export default function ModuleListToolbar({ dark, filter, loading, installingModuleName, uninstalledCount, runningCount, stoppedCount, onFilterChange, onInstallAll, onStartAll, onStopAll, onOpenWorldEditor }: ModuleListToolbarProps): React.JSX.Element { const installingAll = installingModuleName === '__all__' const startingAll = installingModuleName === '__start_all__' const stoppingAll = installingModuleName === '__stop_all__' const bulkActions = [ { label: '맵설정', Icon: MapPinned, busy: false, disabled: false, onClick: onOpenWorldEditor }, { label: '전체 설치', Icon: Download, busy: installingAll, disabled: loading || installingModuleName !== null || uninstalledCount === 0, onClick: onInstallAll }, { label: '전체 실행', Icon: Play, busy: startingAll, disabled: loading || installingModuleName !== null || stoppedCount === 0, onClick: onStartAll }, { label: '전체 중지', Icon: Square, busy: stoppingAll, disabled: loading || installingModuleName !== null || runningCount === 0, onClick: onStopAll } ] return (