// components/users/RoleBadge.jsx
export default function RoleBadge({ role }) {
  const label =
    role === 1 ? "Yönetici" : role === 2 ? "Kullanıcı" : `Rol: ${role}`;

  const cls =
    role === 1
      ? "bg-[#e04a3b]/10 text-[#e04a3b] border-[#e04a3b]/15"
      : role === 2
      ? "bg-indigo-500/10 text-indigo-700 border-indigo-500/15"
      : "bg-black/5 text-black/70 border-black/10";

  return (
    <span
      className={[
        "inline-flex items-center rounded-full border px-3 py-1 text-xs font-semibold",
        cls,
      ].join(" ")}
    >
      {label}
    </span>
  );
}