import { Badge } from "@/components/ui/badge";
import type { ProposalStatus } from "@/lib/mock/types";
import { statusLabel } from "@/lib/mock/proposals";
import { cn } from "@/lib/utils";

const styles: Record<ProposalStatus, string> = {
  rascunho: "bg-muted text-muted-foreground hover:bg-muted",
  enviada:
    "bg-primary/10 text-primary hover:bg-primary/15 border-primary/20",
  aprovada:
    "bg-success/15 text-success-foreground border-success/30 hover:bg-success/20",
  expirada:
    "bg-destructive/10 text-destructive border-destructive/20 hover:bg-destructive/15",
};

export function ProposalStatusBadge({ status }: { status: ProposalStatus }) {
  return (
    <Badge variant="outline" className={cn("font-medium", styles[status])}>
      {statusLabel[status]}
    </Badge>
  );
}
