"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;

var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));

var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));

var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get"));

var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));

var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));

var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));

var enhancer = function enhancer(WrappedComponent) {
  return /*#__PURE__*/function (_WrappedComponent) {
    (0, _inherits2["default"])(Progress, _WrappedComponent);

    var _super = (0, _createSuper2["default"])(Progress);

    function Progress() {
      (0, _classCallCheck2["default"])(this, Progress);
      return _super.apply(this, arguments);
    }

    (0, _createClass2["default"])(Progress, [{
      key: "componentDidUpdate",
      value: function componentDidUpdate() {
        if (!this.path) {
          return;
        }

        var pathStyle = this.path.style;
        pathStyle.transitionDuration = '.3s, .3s, .3s, .06s';
        var now = Date.now();

        if (this.prevTimeStamp && now - this.prevTimeStamp < 100) {
          pathStyle.transitionDuration = '0s, 0s';
        }

        this.prevTimeStamp = Date.now();
      }
    }, {
      key: "render",
      value: function render() {
        return (0, _get2["default"])((0, _getPrototypeOf2["default"])(Progress.prototype), "render", this).call(this);
      }
    }]);
    return Progress;
  }(WrappedComponent);
};

var _default = enhancer;
exports["default"] = _default;
//# sourceMappingURL=enhancer.js.map
