import TrustTooltip from "./trust-tooltip";

interface VerifiedBadgeProps {
  verified: boolean;
  vip: boolean;
  size?: "sm" | "md" | "lg";
}

const sizes = {
  sm: "w-4 h-4",
  md: "w-5 h-5",
  lg: "w-6 h-6",
};

export default function VerifiedBadge({
  verified,
  vip,
  size = "md",
}: VerifiedBadgeProps) {
  if (!verified && !vip) return null;

  const s = sizes[size];

  return (
    <span className="inline-flex items-center gap-1">
      {verified && (
        <TrustTooltip content="Verified Escort">
          <svg
            className={`${s} text-blue-400 drop-shadow-sm shrink-0 transition-transform hover:scale-110`}
            viewBox="0 0 24 24"
            fill="none"
          >
            <path
              d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4z"
              fill="currentColor"
              opacity="0.15"
            />
            <path
              d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4z"
              stroke="currentColor"
              strokeWidth="1.5"
              strokeLinejoin="round"
              fill="none"
            />
            <path
              d="M9 12l2 2 4-4"
              stroke="currentColor"
              strokeWidth="2"
              strokeLinecap="round"
              strokeLinejoin="round"
            />
          </svg>
        </TrustTooltip>
      )}
      {vip && (
        <TrustTooltip content="VIP Member">
          <svg
            className={`${s} text-yellow-400 drop-shadow-sm shrink-0 transition-transform hover:scale-110`}
            viewBox="0 0 24 24"
            fill="currentColor"
          >
            <path d="M12 2l2.9 6.26L22 9.27l-5 4.87L18.18 22 12 18.56 5.82 22 7 14.14 2 9.27l7.1-1.01L12 2z" />
          </svg>
        </TrustTooltip>
      )}
    </span>
  );
}
