import { Box, Layers } from 'lucide-react'; import React, { memo, useState } from 'react'; import { useI18n } from '../../application/i18n/I18nProvider'; import type { useSystemManagerBackend } from '../../application/state/useSystemManagerBackend'; import type { TerminalSession } from '../../types'; import { cn } from '../../lib/utils'; import { DockerContainersPanel } from './DockerContainersPanel'; import { DockerImagesPanel } from './DockerImagesPanel'; import { SystemPanelShell } from './SystemPanelUi'; type Backend = ReturnType; type DockerSubTab = 'containers' | 'images'; interface DockerManagerTabProps { sessionId: string; parentSession: TerminalSession; isVisible: boolean; warmupEnabled?: boolean; backend: Backend; listRefreshIntervalSec: number; statsRefreshIntervalSec: number; targetOs?: 'linux' | 'darwin' | 'win32' | 'unknown'; } export const DockerManagerTab = memo(function DockerManagerTab({ sessionId, parentSession, isVisible, warmupEnabled = false, backend, listRefreshIntervalSec, statsRefreshIntervalSec, targetOs = 'unknown', }: DockerManagerTabProps) { const { t } = useI18n(); const [subTab, setSubTab] = useState('containers'); const tabs: { id: DockerSubTab; icon: typeof Box; label: string }[] = [ { id: 'containers', icon: Box, label: t('systemManager.docker.subTabs.containers') }, { id: 'images', icon: Layers, label: t('systemManager.docker.subTabs.images') }, ]; return (
{tabs.map(({ id, icon: Icon, label }) => ( ))}
); });