"use strict";

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

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

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

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

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

var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));

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

var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));

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

var _placeholder = _interopRequireDefault(require("./placeholder"));

var _propTypes = _interopRequireDefault(require("prop-types"));

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

var preventInteractionStyle = {
  flex: 1,
  WebkitTouchCallout: 'none',
  WebkitUserSelect: 'none',
  KhtmlUserSelect: 'none',
  MozUserSelect: 'none',
  MsUserSelect: 'none',
  UserSelect: 'none'
};

var DroppablePlaceholder = /*#__PURE__*/function (_React$Component) {
  (0, _inherits2["default"])(DroppablePlaceholder, _React$Component);

  var _super = _createSuper(DroppablePlaceholder);

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

  (0, _createClass2["default"])(DroppablePlaceholder, [{
    key: "render",
    value: function render() {
      var _this$props = this.props,
          children = _this$props.children,
          connectDropTarget = _this$props.connectDropTarget,
          isOver = _this$props.isOver,
          disabled = _this$props.disabled,
          classes = _this$props.classes;
      return connectDropTarget( /*#__PURE__*/_react["default"].createElement("div", {
        style: preventInteractionStyle
      }, /*#__PURE__*/_react["default"].createElement(_placeholder["default"], {
        disabled: disabled,
        isOver: isOver,
        choiceBoard: true,
        className: classes
      }, children)));
    }
  }]);
  return DroppablePlaceholder;
}(_react["default"].Component);

exports.DroppablePlaceholder = DroppablePlaceholder;
(0, _defineProperty2["default"])(DroppablePlaceholder, "propTypes", {
  classes: _propTypes["default"].object,
  connectDropTarget: _propTypes["default"].func.isRequired,
  isOver: _propTypes["default"].bool,
  children: _propTypes["default"].oneOfType([_propTypes["default"].arrayOf(_propTypes["default"].node), _propTypes["default"].node]).isRequired,
  disabled: _propTypes["default"].bool
});
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb2RlL2RyYWcvZHJvcHBhYmxlLXBsYWNlaG9sZGVyLmpzeCJdLCJuYW1lcyI6WyJwcmV2ZW50SW50ZXJhY3Rpb25TdHlsZSIsImZsZXgiLCJXZWJraXRUb3VjaENhbGxvdXQiLCJXZWJraXRVc2VyU2VsZWN0IiwiS2h0bWxVc2VyU2VsZWN0IiwiTW96VXNlclNlbGVjdCIsIk1zVXNlclNlbGVjdCIsIlVzZXJTZWxlY3QiLCJEcm9wcGFibGVQbGFjZWhvbGRlciIsInByb3BzIiwiY2hpbGRyZW4iLCJjb25uZWN0RHJvcFRhcmdldCIsImlzT3ZlciIsImRpc2FibGVkIiwiY2xhc3NlcyIsIlJlYWN0IiwiQ29tcG9uZW50IiwiUHJvcFR5cGVzIiwib2JqZWN0IiwiZnVuYyIsImlzUmVxdWlyZWQiLCJib29sIiwib25lT2ZUeXBlIiwiYXJyYXlPZiIsI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