"use strict";

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

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.spec = exports["default"] = void 0;

var _reactDnd = require("react-dnd");

var _droppablePlaceholder = require("./droppable-placeholder");

var _dragType = _interopRequireDefault(require("./drag-type"));

var spec = {
  canDrop: function canDrop(props) {
    return !props.disabled;
  },
  drop: function drop(props, monitor) {
    var item = monitor.getItem();

    if (props.onRemoveAnswer) {
      props.onRemoveAnswer(item);
    }
  }
};
exports.spec = spec;
var WithTarget = (0, _reactDnd.DropTarget)(_dragType["default"].types.ica, spec, function (connect, monitor) {
  return {
    connectDropTarget: connect.dropTarget(),
    isOver: monitor.isOver()
  };
})(_droppablePlaceholder.DroppablePlaceholder);
var _default = WithTarget;
exports["default"] = _default;
//# sourceMappingURL=ica-dp.js.map