type StatusType = "합격" | "불합격" | "보류" | "발주완료" | "검토중" | "취소" | "완료" | "승인대기";

interface StatusBadgeProps {
  status: StatusType;
  size?: "sm" | "md" | "lg";
}

const COLOR_MAP: Record<StatusType, string> = {
  합격: "bg-white text-[#16A34A] border-[#16A34A]",
  완료: "bg-white text-[#16A34A] border-[#16A34A]",
  발주완료: "bg-white text-[#16A34A] border-[#16A34A]",
  불합격: "bg-[#DC2626] text-white border-[#DC2626]",
  취소: "bg-[#DC2626] text-white border-[#DC2626]",
  보류: "bg-[#D97706] text-white border-[#D97706]",
  검토중: "bg-[#D97706] text-white border-[#D97706]",
  승인대기: "bg-[#2563EB] text-white border-[#2563EB]",
};

const SIZE_MAP = {
  sm: "px-2 py-0.5 text-xs",
  md: "px-3 py-1 text-sm",
  lg: "px-8 py-3 text-2xl",
};

export default function StatusBadge({ status, size = "md" }: StatusBadgeProps) {
  return (
    <span className={`inline-flex items-center justify-center border-2 ${COLOR_MAP[status]} ${SIZE_MAP[size]}`}>
      {status}
    </span>
  );
}
