'use client'

const STYLES: Record<string, { bg: string; label: string }> = {
  CRITICAL: { bg: 'bg-red-600 text-white', label: 'Kritisch' },
  HIGH:     { bg: 'bg-orange-500 text-white', label: 'Hoch' },
  MEDIUM:   { bg: 'bg-yellow-400 text-gray-900', label: 'Mittel' },
  LOW:      { bg: 'bg-blue-100 text-blue-800', label: 'Niedrig' },
}

export function SeverityBadge({ value }: { value: string }) {
  const s = STYLES[value] || { bg: 'bg-gray-200 text-gray-700', label: value }
  return <span className={`px-2 py-0.5 text-xs font-bold rounded ${s.bg}`}>{s.label}</span>
}
