const STATUS_MAP: Record<string, string> = {
  COMPLETED: 'sb-badge-completed',
  FAILED: 'sb-badge-failed',
  RUNNING: 'sb-badge-running',
  STARTING: 'sb-badge-running',
  STARTED: 'sb-badge-running',
  STOPPING: 'sb-badge-stopped',
  STOPPED: 'sb-badge-stopped',
  ABANDONED: 'sb-badge-abandoned',
}

interface StatusBadgeProps {
  status: string
}

export default function StatusBadge({ status }: StatusBadgeProps) {
  const cls = STATUS_MAP[status] ?? 'sb-badge-unknown'

  return (
    <span className={`sb-badge ${cls}`}>
      <span className="sb-badge-dot" />
      {status}
    </span>
  )
}
