/** * NetworkToolsPanel -- Container for network diagnostic tools. * * Sub-tabs: Ping, Traceroute, Bandwidth Test, Torch. * Each tool is an interactive command executor, not a CRUD panel. */ import { useState } from 'react' import type { ConfigPanelProps } from '@/lib/configPanelTypes' import { PingTool } from './PingTool' import { TracerouteTool } from './TracerouteTool' import { BandwidthTestTool } from './BandwidthTestTool' import { TorchTool } from './TorchTool' import { cn } from '@/lib/utils' const TOOLS = [ { id: 'ping', label: 'Ping' }, { id: 'traceroute', label: 'Traceroute' }, { id: 'bw-test', label: 'BW Test' }, { id: 'torch', label: 'Torch' }, ] as const type ToolId = (typeof TOOLS)[number]['id'] export function NetworkToolsPanel(props: ConfigPanelProps) { const [activeTool, setActiveTool] = useState('ping') return (
{/* Sub-tab selector */}
{TOOLS.map((tool) => ( ))}
{activeTool === 'ping' && } {activeTool === 'traceroute' && } {activeTool === 'bw-test' && } {activeTool === 'torch' && }
) }