import { Badge } from "@/components/ui/badge"
import { QUESTION_STATUSES } from "@/lib/constants"
import type { QuestionStatus } from "@/types/question"

const statusVariants: Record<QuestionStatus, "default" | "secondary" | "outline" | "destructive"> = {
  draft: "outline",
  reviewing: "secondary",
  published: "default",
  archived: "destructive",
}

export function StatusBadge({ status }: { status: QuestionStatus }) {
  return (
    <Badge variant={statusVariants[status]}>
      {QUESTION_STATUSES[status]}
    </Badge>
  )
}
