import React from 'react';
import classNames from 'classnames';
import { t } from '../i18n';
/**
 * For information about how and when to use this component,
 * [refer to its full documentation page](https://design.cms.gov/components/spinner/).
 */
export var Spinner = function Spinner(props) {
  var _props$ariaValuetext;
  var className = classNames('ds-c-spinner', props.size && "ds-c-spinner--".concat(props.size), props.inversed && 'ds-c-spinner--inverse', props.filled && 'ds-c-spinner--filled', props.className);
  return /*#__PURE__*/React.createElement("span", {
    className: className,
    role: props.role
  }, /*#__PURE__*/React.createElement("span", {
    className: "ds-u-visibility--screen-reader"
  }, (_props$ariaValuetext = props['aria-valuetext']) !== null && _props$ariaValuetext !== void 0 ? _props$ariaValuetext : t('spinner.ariaText')));
};
Spinner.defaultProps = {
  role: 'status'
};
export default Spinner;