"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = exports.Spinner = void 0;
var _classnames = _interopRequireDefault(require("classnames"));
var _i18n = require("../i18n");
var _jsxRuntime = require("preact/compat/jsx-runtime");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
/**
 * For information about how and when to use this component,
 * [refer to its full documentation page](https://design.cms.gov/components/spinner/).
 */
const Spinner = props => {
  const className = (0, _classnames.default)('ds-c-spinner', props.size && `ds-c-spinner--${props.size}`, props.inversed && 'ds-c-spinner--inverse', props.filled && 'ds-c-spinner--filled', props.className);
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
    className: className,
    role: props.role,
    children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
      className: "ds-u-visibility--screen-reader",
      children: props['aria-valuetext'] ?? (0, _i18n.t)('spinner.ariaText')
    })
  });
};
exports.Spinner = Spinner;
Spinner.defaultProps = {
  role: 'status'
};
var _default = exports.default = Spinner;