"use client";

import { STAGE_COLORS } from "./types";
import type { ClassifiedDeal } from "./types";

export function StageBadge({ stage }: { stage: ClassifiedDeal["displayStage"] }) {
  const c = STAGE_COLORS[stage] ?? STAGE_COLORS["Unknown Stage"];
  return (
    <span
      className={`inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-semibold border whitespace-nowrap ${c.bg} ${c.text} ${c.border}`}
    >
      <span className={`w-1.5 h-1.5 rounded-full shrink-0 ${c.dot}`} />
      {stage}
    </span>
  );
}
