import _extends from "@babel/runtime/helpers/esm/extends";
import React from 'react';
import { ThemeContext } from "../../../lib/theming/ThemeContext";
import { styles } from "../../../components/Spinner/Spinner.styles";
import { cx } from "../../../lib/theming/Emotion";
import { SpinnerIcon } from "../../SpinnerIcon/SpinnerIcon";
import { iconSizer } from "../iconSizer";
var Icon = function Icon(props) {
  var theme = React.useContext(ThemeContext);
  return /*#__PURE__*/(
    React.createElement(SpinnerIcon, _extends({
      dimmed: true,
      className: cx(styles.circle(theme), styles.circleDimmedColor(theme), styles.circleWithoutColorAnimation())
    }, props))
  );
};
export var LoadingIcon = iconSizer({
  small: function small() {
    return /*#__PURE__*/React.createElement(Icon, {
      size: "mini"
    });
  },
  medium: function medium() {
    return /*#__PURE__*/(
      React.createElement(Icon, {
        size: {
          size: 20,
          width: 1,
          radius: 6
        }
      })
    );
  },
  large: function large() {
    return /*#__PURE__*/(
      React.createElement(Icon, {
        size: {
          size: 24,
          width: 1.5,
          radius: 8
        }
      })
    );
  }
}, 'LoadingIcon');