'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var _extends = require('@babel/runtime/helpers/extends');
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
var React = require('react');
var evokit = require('@prom-ui/core/evokit');

function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }

function _interopNamespaceCompat(e) {
    if (e && typeof e === 'object' && 'default' in e) return e;
    var n = Object.create(null);
    if (e) {
        Object.keys(e).forEach(function (k) {
            if (k !== 'default') {
                var d = Object.getOwnPropertyDescriptor(e, k);
                Object.defineProperty(n, k, d.get ? d : {
                    enumerable: true,
                    get: function () { return e[k]; }
                });
            }
        });
    }
    n.default = e;
    return Object.freeze(n);
}

var _extends__default = /*#__PURE__*/_interopDefaultCompat(_extends);
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultCompat(_objectWithoutProperties);
var React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);

var css = {"ek-spinner":"Spinner__ek-spinner___K7r-c","rotate":"Spinner__rotate___aKoVD","ek-spinner__circle":"Spinner__ek-spinner__circle___a5Jex","dash":"Spinner__dash___bKr0a","ek-spinner_color_violet-500":"Spinner__ek-spinner_color_violet-500___9sMtP","ek-spinner_color_white":"Spinner__ek-spinner_color_white___Vd4Z7","ek-spinner_color_yellow-500":"Spinner__ek-spinner_color_yellow-500___Wp548"};

var _excluded = ["width", "height"];
var SpinnerBlock = evokit.createBlock('svg', 'spinner', ['color'], {
  css: css
});
SpinnerBlock.displayName = 'SpinnerBlock';
var SpinnerCircleBlock = evokit.createBlock('circle', 'spinner__circle', [], {
  css: css
});
SpinnerCircleBlock.displayName = 'SpinnerCircleBlock';
var Spinner = /*#__PURE__*/React__namespace.forwardRef(function (_ref, ref) {
  var _ref$width = _ref.width,
    width = _ref$width === void 0 ? '1em' : _ref$width,
    _ref$height = _ref.height,
    height = _ref$height === void 0 ? '1em' : _ref$height,
    props = _objectWithoutProperties__default.default(_ref, _excluded);
  return /*#__PURE__*/React__namespace.createElement(SpinnerBlock, _extends__default.default({
    ref: ref,
    role: "progressbar",
    width: width,
    height: height
  }, props, {
    viewBox: "22 22 44 44"
  }), /*#__PURE__*/React__namespace.createElement(SpinnerCircleBlock, {
    fill: "none",
    cx: 44,
    cy: 44,
    r: 20.2,
    strokeWidth: 3.6
  }));
});
Spinner.displayName = 'Spinner';

exports.Spinner = Spinner;

require('./style.development.css');
