import type { PaymentStatus } from "@/types/order";
import { PAYMENT_STATUS_LABEL } from "@/lib/labels";

const COLOR: Record<PaymentStatus, string> = {
  pending: "bg-kolabora-neutral-dark/10 text-kolabora-neutral-dark/70",
  settlement: "bg-green-50 text-green-700",
  capture: "bg-green-50 text-green-700",
  expire: "bg-red-50 text-red-700",
  cancel: "bg-red-50 text-red-700",
  deny: "bg-red-50 text-red-700",
  refunded: "bg-kolabora-tertiary/15 text-kolabora-tertiary",
};

export function PaymentStatusBadge({ status }: { status: PaymentStatus }) {
  return (
    <span className={`rounded-full px-3 py-1 text-xs font-medium ${COLOR[status]}`}>
      {PAYMENT_STATUS_LABEL[status]}
    </span>
  );
}
