import { action, makeObservable } from 'mobx';
import { CollectionDragAndDropState } from './CollectionDragAndDropState';
export class TableDragAndDropState {
    constructor(params) {
        this.tableState = params.tableState;
        this.dragAndDrop = new CollectionDragAndDropState({
            state: params.tableState.toolbar,
            container: params.tableState.toolbar.container,
            a11yContainer: params.modalsContainerRef,
        });
        makeObservable(this, {
            init: action,
        });
    }
    get dnd() {
        return this.dragAndDrop.dnd;
    }
    getStickyColumnsCount({ stickyColumns, horizontalScroll, }) {
        const { dragAndDrop } = this;
        return horizontalScroll && !dragAndDrop.dnd.isDisabled
            ? stickyColumns + 1
            : stickyColumns;
    }
    init() {
        const { dragAndDrop } = this;
        return dragAndDrop.init();
    }
}
//# sourceMappingURL=TableDragAndDropState.js.map