import { cn } from "@/lib/ui/variants";

interface SpinnerProps {
  className?: string;
}

// 转圈忙碌指示：环形（顶部留缺口）motion-safe 旋转；reduced-motion 下为静止环。
export function Spinner({ className }: SpinnerProps) {
  return (
    <span
      aria-hidden="true"
      className={cn(
        "inline-block h-4 w-4 shrink-0 rounded-full border-2 border-current border-t-transparent motion-safe:animate-spin",
        className,
      )}
    />
  );
}
