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

function Spinner({ className, size = "default" }: { className?: string; size?: "sm" | "default" | "lg" }) {
    const sizeClasses = {
        sm: "h-4 w-4",
        default: "h-8 w-8",
        lg: "h-12 w-12"
    }

    return (
        <div className={cn("flex items-center justify-center", className)}>
            <div
                className={cn(
                    "animate-spin rounded-full border-2 border-current border-t-transparent text-primary",
                    sizeClasses[size]
                )}
            />
        </div>
    )
}

export { Spinner }
