'use client'

import { getRiskColor, getRiskLevelLabel, REVIEW_STATUS_LABELS } from './types'

export function RiskBadge({ level }: { level: string }) {
  return (
    <span className={`inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium border ${getRiskColor(level)}`}>
      {getRiskLevelLabel(level)}
    </span>
  )
}

export function ReviewStatusBadge({ status }: { status: string }) {
  const colors: Record<string, string> = {
    draft: 'bg-gray-100 text-gray-600 border-gray-200',
    in_review: 'bg-blue-100 text-blue-600 border-blue-200',
    reviewed: 'bg-indigo-100 text-indigo-600 border-indigo-200',
    approved: 'bg-green-100 text-green-600 border-green-200',
    rejected: 'bg-red-100 text-red-600 border-red-200',
  }
  return (
    <span className={`inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium border ${colors[status] || colors.draft}`}>
      {REVIEW_STATUS_LABELS[status] || status}
    </span>
  )
}
