import { VeryLightGray } from "../../../Types/BrandColors";
import React from "react";
import BarLoader from "react-spinners/BarLoader";
import BeatLoader from "react-spinners/BeatLoader";
export var LoaderType;
(function (LoaderType) {
    LoaderType[LoaderType["Bar"] = 0] = "Bar";
    LoaderType[LoaderType["Beats"] = 1] = "Beats";
})(LoaderType || (LoaderType = {}));
const Loader = ({ size = 50, color = VeryLightGray, loaderType = LoaderType.Bar, className = "", }) => {
    if (loaderType === LoaderType.Bar) {
        return (React.createElement("div", { role: "status", "aria-label": "Loading", "aria-live": "polite", className: `flex justify-center mt-1 ${className}`.trim(), "data-testid": "bar-loader" },
            React.createElement(BarLoader, { height: 4, width: size, color: color.toString() }),
            React.createElement("span", { className: "sr-only" }, "Loading...")));
    }
    if (loaderType === LoaderType.Beats) {
        return (React.createElement("div", { role: "status", "aria-label": "Loading", "aria-live": "polite", className: `justify-center mt-1 ${className}`.trim(), "data-testid": "beat-loader" },
            React.createElement(BeatLoader, { size: size, color: color.toString() }),
            React.createElement("span", { className: "sr-only" }, "Loading...")));
    }
    return React.createElement(React.Fragment, null);
};
export default Loader;
//# sourceMappingURL=Loader.js.map