"use strict";

function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = exports.DesignerClickAwayListener = void 0;
var React = _interopRequireWildcard(require("react"));
var _propTypes = _interopRequireDefault(require("prop-types"));
var _ServiceLocator = require("../../../ServiceLocator");
var _styles = require("@material-ui/core/styles");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
var styles = function styles() {
  return {
    root: {
      position: 'absolute',
      height: '100%',
      width: '100%'
    }
  };
};
var DesignerClickAwayListener = exports.DesignerClickAwayListener = function DesignerClickAwayListener(_ref) {
  var classes = _ref.classes;
  return /*#__PURE__*/React.createElement("div", {
    className: classes.root,
    onClick: function onClick() {
      return _ServiceLocator.Services.designData.clearDesignAreaSelection();
    }
  });
};
var _default = exports["default"] = (0, _styles.withStyles)(styles, {
  name: 'DesignerClickAwayListener'
})(DesignerClickAwayListener);