"use strict";var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;exports.__esModule = true;exports.LoadingIcon = void 0;var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));var _react = _interopRequireDefault(require("react"));

var _ThemeContext = require("../../lib/theming/ThemeContext");
var _Spinner = require("../../components/Spinner/Spinner.styles");
var _Emotion = require("../../lib/theming/Emotion");

var _SpinnerIcon = require("../SpinnerIcon/SpinnerIcon");

var _iconSizer = require("./iconSizer");

var Icon = function Icon(props) {
  var theme = _react.default.useContext(_ThemeContext.ThemeContext);
  return /*#__PURE__*/(
    _react.default.createElement(_SpinnerIcon.SpinnerIcon, (0, _extends2.default)({
      dimmed: true,
      className: (0, _Emotion.cx)(_Spinner.styles.circle(theme), _Spinner.styles.circleDimmedColor(theme), _Spinner.styles.circleWithoutColorAnimation()) },
    props)
    ));

};

var LoadingIcon = exports.LoadingIcon = (0, _iconSizer.iconSizer)(
  {
    small: function small() {return /*#__PURE__*/_react.default.createElement(Icon, { size: "mini" });},
    medium: function medium() {return /*#__PURE__*/(
        _react.default.createElement(Icon, {
          size: {
            size: 20,
            width: 1,
            radius: 6
          } }
        ));},

    large: function large() {return /*#__PURE__*/(
        _react.default.createElement(Icon, {
          size: {
            size: 24,
            width: 1.5,
            radius: 8
          } }
        ));}

  },
  'LoadingIcon'
);