import { GenericBadge } from '../shared/GenericBadge'
import type { ReviewEntityType } from '../../domain/review'

const CONFIG: Record<ReviewEntityType, { label: string; color: string }> = {
  FUTURE_SIGNAL:        { label: 'Zukunftssignal',   color: '#7c3aed' },
  MATCH_EXPLANATION:    { label: 'Match-Begründung', color: '#152642' },
  LOW_CONFIDENCE_MATCH: { label: 'Niedr. Konfidenz', color: '#ea580c' },
  CONTACT_RELEASE:      { label: 'Kontaktfreigabe',  color: '#0891b2' },
  AI_OUTPUT:            { label: 'AI-Output',        color: '#4f46e5' },
  PROPERTY_DATA_ISSUE:  { label: 'Datenfehler',      color: '#c0392b' },
}

interface Props {
  entityType: ReviewEntityType
  size?: 'small' | 'medium'
}

export function ReviewEntityTypeBadge({ entityType, size = 'small' }: Props) {
  const { label, color } = CONFIG[entityType] ?? { label: entityType, color: '#64748b' }
  return <GenericBadge label={label} color={color} size={size} />
}
