"use strict";

exports.__esModule = true;
exports.NestedTableDragAndDrop = void 0;
var _dragAndDrop = require("@wix/wix-style-react-incubator/drag-and-drop");
var _NestedTableDragAndDropContext = require("./NestedTableDragAndDropContext");
var _NestedTableDragAndDropState = require("./NestedTableDragAndDropState");
var _minimalRequiredWdsRuntimeCheck = require("../../minimalRequiredWdsRuntimeCheck");
var _NestedTableDragHandle = require("./NestedTableDragHandle");
var _NestedTableGhostIndentationCell = require("./NestedTableGhostIndentationCell");
var _NestedTableDragAndDropRow = require("./NestedTableDragAndDropRow");
if (process.env.NODE_ENV !== 'production') {
  (0, _minimalRequiredWdsRuntimeCheck.minimalRequiredWdsRuntimeCheck)({
    required: '^1.64.1',
    requiredBy: 'WixPatterns/NestedTableDragAndDrop'
  });
}
function setStateObject(params) {
  var _state$nested;
  const {
    state
  } = params;
  (_state$nested = state.nested).nestedTableDragAndDrop ?? (_state$nested.nestedTableDragAndDrop = new _NestedTableDragAndDropState.NestedTableDragAndDropState({
    nestedState: state.nested
  }));
  state.tableState.tableDragAndDropState = state.nested.nestedTableDragAndDrop;
  state.toolbar._dnd = state.nested.nestedTableDragAndDrop.dnd;
}
const NestedTableDragAndDrop = exports.NestedTableDragAndDrop = {
  ..._dragAndDrop.TableDragAndDrop,
  createDragHandleColumn: null,
  // override default TableDragAndDrop.createDragHandleColumn - in NestedTable the drag handle is rendered manually in `<NestedTableParentCell/>`
  NestedTableDragAndDropContext: _NestedTableDragAndDropContext.NestedTableDragAndDropContext,
  NestedTableDragAndDropRow: _NestedTableDragAndDropRow.NestedTableDragAndDropRow,
  setStateObject,
  NestedTableDragHandle: _NestedTableDragHandle.NestedTableDragHandle,
  NestedTableGhostIndentationCell: _NestedTableGhostIndentationCell.NestedTableGhostIndentationCell
};
//# sourceMappingURL=NestedTableDragAndDrop.js.map