import { Loader2 } from "lucide-react";

import { cn } from "@/lib/utils";

interface AuthLoadingSpinnerProps {
  label?: string;
  className?: string;
}

export function AuthLoadingSpinner({
  label = "Loading...",
  className,
}: AuthLoadingSpinnerProps) {
  return (
    <div
      className={cn(
        "flex flex-col items-center justify-center gap-3 text-neutral-600",
        className
      )}
      role="status"
      aria-live="polite"
    >
      <Loader2 className="h-8 w-8 animate-spin text-primary-600" aria-hidden />
      <p className="text-sm font-medium">{label}</p>
    </div>
  );
}
