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

const STATUS_META: Record<string, { label: string; color: string }> = {
  DRAFT:        { label: 'Entwurf',     color: '#64748b' },
  REVIEW_READY: { label: 'Prüfbereit',  color: '#d97706' },
  FINALIZED:    { label: 'Finalisiert', color: '#1a7a4a' },
  ARCHIVED:     { label: 'Archiviert',  color: '#475569' },
  ACTIVE:       { label: 'Aktiv',       color: '#1e3a5f' },
  SHARED:       { label: 'Geteilt',     color: '#7c3aed' },
  CONVERTED:    { label: 'Konvertiert', color: '#0891b2' },
}

export function ShortlistStatusBadge({ status }: { status: ShortlistStatus }) {
  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 }}
    />
  )
}
