import loadingSvg from "@/assets/loading.min.svg";

interface LoaderProps {
  size?: number;
  className?: string;
}

export default function Loader({ size = 120, className = "" }: LoaderProps) {
  return (
    <div
      className={`animate-spin-slow ${className}`}
      style={{
        width: size,
        height: size,
        background: "var(--primary)",
        maskImage: `url(${loadingSvg})`,
        maskSize: "contain",
        maskRepeat: "no-repeat",
        maskPosition: "center",
        WebkitMaskImage: `url(${loadingSvg})`,
        WebkitMaskSize: "contain",
        WebkitMaskRepeat: "no-repeat",
        WebkitMaskPosition: "center",
      }}
    />
  );
}
