import type { UserStatus } from "../types/user";

interface UserStatusBadgeProps {
  status: UserStatus;
}

export function UserStatusBadge({
  status,
}: UserStatusBadgeProps) {
  const statusConfig: Record<
    UserStatus,
    {
      label: string;
      color: string;
    }
  > = {
    Active: {
      label: "Active",
      color: "bg-success-light text-success",
    },
    Inactive: {
      label: "Inactive",
      color: "bg-danger-light text-danger",
    },
    Pending: {
      label: "Pending",
      color: "bg-yellow-100 text-yellow-700",
    },
  };

  const config = statusConfig[status];

  return (
    <span
      className={`inline-flex items-center rounded-full px-3 py-1 text-xs font-medium ${config.color}`}
    >
      {config.label}
    </span>
  );
}