import React, { forwardRef } from "react";
import { useTailSpin } from "../../../utils/index.js";
import { Div } from "../../native/index.js";
const DEFAULT_SPEED = 400;
const DEFAULT_SIZE = "2rem";
const Loader = forwardRef(({ color = "currentColor", speed = DEFAULT_SPEED, size = DEFAULT_SIZE, className, show, ...props }, ref) => {
    const spinnerBg = useTailSpin({ size, color, speed });
    if (show === false) {
        return null;
    }
    return (React.createElement(Div, { ref: ref, className: className, css: { width: size, height: size, backgroundImage: `url('${spinnerBg}')` } }));
});
Loader.displayName = "Loader";
Loader.toString = () => Div.toString();
export { Loader };
//# sourceMappingURL=Loader.js.map