"use strict";

exports.__esModule = true;
exports.default = exports.Wrapper = void 0;

var _react = _interopRequireDefault(require("react"));

var _reactDom = _interopRequireDefault(require("react-dom"));

var _styledTransitionGroup = _interopRequireDefault(require("styled-transition-group"));

var _templateObject;

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

(function () {
  var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
  enterModule && enterModule(module);
})();

(function () {
  var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
  enterModule && enterModule(module);
})();

function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }

var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
  return a;
};

var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
  return a;
};

var getModalRoot = function getModalRoot() {
  return document.getElementById("modal");
};

var Wrapper = _styledTransitionGroup.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tz-index: 9999;\n\tdisplay: flex;\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\tbottom: 0;\n\tright: 0;\n\ttransition: opacity ", "ms ease-out;\n\n\t&:enter {\n\t\topacity: 0.01;\n\t}\n\t&:enter-active {\n\t\topacity: 1;\n\t}\n\t&:exit {\n\t\topacity: 1;\n\t}\n\t&:exit-active {\n\t\topacity: 0.01;\n\t}\n"])), function (props) {
  return props.timeout;
});

exports.Wrapper = Wrapper;
Wrapper.defaultProps = {
  timeout: 300,
  unmountOnExit: true
};

var _default = function _default(props) {
  return _reactDom.default.createPortal( /*#__PURE__*/_react.default.createElement(Wrapper, props), getModalRoot());
};

var _default2 = _default;
var _default3 = _default2;
exports.default = _default3;
;

(function () {
  var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;

  if (!reactHotLoader) {
    return;
  }

  reactHotLoader.register(getModalRoot, "getModalRoot", "/home/vsts/work/1/s/src/components/Modal/Wrapper.js");
  reactHotLoader.register(Wrapper, "Wrapper", "/home/vsts/work/1/s/src/components/Modal/Wrapper.js");
  reactHotLoader.register(_default, "default", "/home/vsts/work/1/s/src/components/Modal/Wrapper.js");
})();

;

(function () {
  var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
  leaveModule && leaveModule(module);
})();

;

(function () {
  var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;

  if (!reactHotLoader) {
    return;
  }

  reactHotLoader.register(getModalRoot, "getModalRoot", "/home/vsts/work/1/s/src/components/Modal/Wrapper.js");
  reactHotLoader.register(Wrapper, "Wrapper", "/home/vsts/work/1/s/src/components/Modal/Wrapper.js");
  reactHotLoader.register(_default2, "default", "/home/vsts/work/1/s/src/components/Modal/Wrapper.js");
})();

;

(function () {
  var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
  leaveModule && leaveModule(module);
})();