import type { LoadingDotsProps } from "$/types/LoadingTypes";


export default function CircleRotatingDots({
	width,
	height,
	className,
	animationDuration = 1.5,
	stroke,
	fill
}: LoadingDotsProps){
	//https://github.com/n3r4zzurr0/svg-spinners/blob/main/svg-smil/8-dots-rotate.svg


	return (
		<svg
			width={width}
			height={height}
			viewBox="0 0 24 24"
			xmlns="http://www.w3.org/2000/svg"
		>
			<g>
				<circle
					cx="3"
					cy="12"
					r="2"
					className={className}
					stroke={stroke}
					fill={fill}
				/>
				<circle
					cx="21"
					cy="12"
					r="2"
					className={className}
					stroke={stroke}
					fill={fill}
				/>
				<circle
					cx="12"
					cy="21"
					r="2"
					className={className}
					stroke={stroke}
					fill={fill}
				/>
				<circle
					cx="12"
					cy="3"
					r="2"
					className={className}
					stroke={stroke}
					fill={fill}
				/>
				<circle
					cx="5.64"
					cy="5.64"
					r="2"
					className={className}
					stroke={stroke}
					fill={fill}
				/>
				<circle
					cx="18.36"
					cy="18.36"
					r="2"
					className={className}
					stroke={stroke}
					fill={fill}
				/>
				<circle
					cx="5.64"
					cy="18.36"
					r="2"
					className={className}
					stroke={stroke}
					fill={fill}
				/>
				<circle
					cx="18.36"
					cy="5.64"
					r="2"
					className={className}
					stroke={stroke}
					fill={fill}
				/>
				<animateTransform
					attributeName="transform"
					type="rotate"
					dur={animationDuration}
					values="0 12 12;360 12 12"
					repeatCount="indefinite"
				/>
			</g>
		</svg>
);
}
