"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=droppable-placeholder.js.map