import { Tag } from '@douyinfe/semi-ui';

export function StatusTag({ status }: { status: 'ok' | 'warning' | 'error' | 'offline' }) {
  const map = {
    ok: { color: 'green' as const, text: '正常' },
    warning: { color: 'orange' as const, text: '关注' },
    error: { color: 'red' as const, text: '异常' },
    offline: { color: 'grey' as const, text: '离线' }
  };
  return <Tag color={map[status].color}>{map[status].text}</Tag>;
}
