"use client";

interface ComplimentaryBadgeProps {
  size?: "sm" | "md";
}

/**
 * Green pill rendered next to a subscription row when `is_complimentary` is true.
 * Pattern matches the existing "Free Trial" blue pill in admin subscription list.
 *
 * Usage:
 *   {sub.is_complimentary && <ComplimentaryBadge />}
 */
export default function ComplimentaryBadge({ size = "md" }: ComplimentaryBadgeProps) {
  const padding = size === "sm" ? "px-2 py-0.5 text-[10px]" : "px-3 py-1 text-xs";
  return (
    <span
      className={`inline-flex items-center gap-1.5 ${padding} rounded-full font-medium bg-emerald-50 text-emerald-700`}
    >
      <span className="w-1.5 h-1.5 rounded-full bg-emerald-500" />
      Complimentary
    </span>
  );
}
