"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxRuntime = require("react/jsx-runtime");
const React = require("react");
const classNames = require("../../utils/classNames.cjs");
const config_context = require("../config/config.context.cjs");
require("./spinner.theme.css.cjs");
function _interopNamespaceDefault(e) {
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
  if (e) {
    for (const k in e) {
      if (k !== "default") {
        const d = Object.getOwnPropertyDescriptor(e, k);
        Object.defineProperty(n, k, d.get ? d : {
          enumerable: true,
          get: () => e[k]
        });
      }
    }
  }
  n.default = e;
  return Object.freeze(n);
}
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
const Spinner = React__namespace.forwardRef(({ children, className, icon, fillContainer, label, ...HTMLProps }, ref) => {
  const { spinnerIcon } = config_context.useArmstrongConfig({ spinnerIcon: icon });
  return jsxRuntime.jsxs("div", { ref, className: classNames.concat("arm-spinner", className), "data-fill-container": fillContainer, role: "status", "aria-busy": true, "aria-label": "Loading...", ...HTMLProps, children: [jsxRuntime.jsx("div", { className: "arm-spinner-inner", children: children || spinnerIcon }), label && jsxRuntime.jsx("div", { className: "arm-spinner-label", children: jsxRuntime.jsx("span", { children: label }) })] });
});
Spinner.displayName = "Spinner";
Spinner.defaultProps = {
  fillContainer: true
};
exports.Spinner = Spinner;
//# sourceMappingURL=spinner.component.cjs.map
