import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { cn } from "../../../utils/cn";
const sizeStyles = {
    sm: "h-4 w-4 border-2",
    md: "h-8 w-8 border-2",
    lg: "h-12 w-12 border-b-2",
};
export const Spinner = ({ size = "md", className, label, testId, }) => {
    return (_jsxs("div", { className: "flex flex-col items-center justify-center", "data-testid": testId, children: [_jsx("div", { className: cn("animate-spin rounded-full border-neutral-900 dark:border-white", sizeStyles[size], className), role: "status", "aria-label": label || "Loading", children: _jsx("span", { className: "sr-only", children: label || "Loading..." }) }), label && (_jsx("p", { className: "mt-2 text-sm text-neutral-600 dark:text-neutral-400", children: label }))] }));
};
export default Spinner;
