"use strict";

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

var _styledComponents = _interopRequireWildcard(require("styled-components"));

var _utils = require("../../utils");

var _withClickOutside = _interopRequireDefault(require("../../hocs/withClickOutside"));

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

function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }

function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }

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

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

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 darkDialogStyle = (0, _styledComponents.css)(["background-color:", ";border-radius:15px;"], (0, _utils.getThemeProp)(["colors", "bgDark"], "#333333"));
var dialogLook = {
  default: (0, _styledComponents.css)(["background-color:white;"]),
  dark: darkDialogStyle
}; // TODO: Add light dialog style for other dialogs, switching mechanism

var Dialog = _styledComponents.default.div.withConfig({
  displayName: "Dialog",
  componentId: "sc-7ohuah-0"
})(["flex:0 0 auto;margin:auto;align-self:center;z-index:10000;", ";"], function (props) {
  return dialogLook[props.look];
});

exports.Dialog = Dialog;
Dialog.defaultProps = {
  look: "default"
};

var _default = (0, _withClickOutside.default)(Dialog);

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

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

  if (!reactHotLoader) {
    return;
  }

  reactHotLoader.register(darkDialogStyle, "darkDialogStyle", "/home/vsts/work/1/s/src/components/Modal/Dialog.js");
  reactHotLoader.register(dialogLook, "dialogLook", "/home/vsts/work/1/s/src/components/Modal/Dialog.js");
  reactHotLoader.register(Dialog, "Dialog", "/home/vsts/work/1/s/src/components/Modal/Dialog.js");
  reactHotLoader.register(_default, "default", "/home/vsts/work/1/s/src/components/Modal/Dialog.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(darkDialogStyle, "darkDialogStyle", "/home/vsts/work/1/s/src/components/Modal/Dialog.js");
  reactHotLoader.register(dialogLook, "dialogLook", "/home/vsts/work/1/s/src/components/Modal/Dialog.js");
  reactHotLoader.register(Dialog, "Dialog", "/home/vsts/work/1/s/src/components/Modal/Dialog.js");
  reactHotLoader.register(_default2, "default", "/home/vsts/work/1/s/src/components/Modal/Dialog.js");
})();

;

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