import { Chip } from '@mui/material'
import type { MatchStatus } from '../../domain/enums'

const STATUS_META: Record<string, { label: string; color: string }> = {
  PENDING_REVIEW: { label: 'Ausstehend', color: '#d97706' },
  APPROVED:       { label: 'Genehmigt',  color: '#1a7a4a' },
  REJECTED:       { label: 'Abgelehnt',  color: '#c0392b' },
  SHORTLISTED:    { label: 'Shortlist',  color: '#1e3a5f' },
}

export function MatchStatusBadge({ status }: { status?: MatchStatus }) {
  if (!status) return null
  const meta = STATUS_META[status] ?? { label: status, color: '#64748b' }
  return (
    <Chip label={meta.label} size="small"
      sx={{ bgcolor: meta.color, color: 'white', fontWeight: 600, fontSize: 11 }} />
  )
}
