import { Badge } from '@cameleer/design-system'; interface Props { state: string; } const config: Record = { RUNNING: { color: 'success', label: 'Running' }, STOPPED: { color: 'error', label: 'Stopped' }, NOT_FOUND: { color: 'auto', label: 'No Server' }, ERROR: { color: 'error', label: 'Error' }, }; export function ServerStatusBadge({ state }: Props) { const c = config[state] ?? { color: 'auto' as const, label: state }; return ; }