import { addColumnAfter, addRowAfter as addRowAfterOrig, removeCurrentColumn, removeCurrentRow, } from "../../../../table-utils/index.js";
import { defineActions } from "../../../../utils/actions.js";
import { findParentBody } from "../helpers.js";
import { setCellCenterAlign, setCellLeftAlign, setCellRightAlign } from "./cellAlign.js";
const addRowAfter = (state, dispatch, view) => {
    if (!findParentBody(state)) {
        return false; // TODO: process when cursor is inside thead
    }
    return addRowAfterOrig(state, dispatch, view);
};
const addRow = {
    isEnable: addRowAfter,
    run: addRowAfter,
};
const deleteRow = {
    isEnable: removeCurrentRow,
    run: removeCurrentRow,
};
const addColumn = {
    isEnable: addColumnAfter,
    run: addColumnAfter,
};
const deleteColumn = {
    isEnable: removeCurrentColumn,
    run: removeCurrentColumn,
};
export const innerActions = defineActions({
    setCellLeftAlign,
    setCellCenterAlign,
    setCellRightAlign,
    addRow,
    deleteRow,
    addColumn,
    deleteColumn,
});
//# sourceMappingURL=innerActions.js.map
