"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.innerActions = void 0;
const table_utils_1 = require("../../../../table-utils/index.js");
const actions_1 = require("../../../../utils/actions.js");
const helpers_1 = require("../helpers.js");
const cellAlign_1 = require("./cellAlign.js");
const addRowAfter = (state, dispatch, view) => {
    if (!(0, helpers_1.findParentBody)(state)) {
        return false; // TODO: process when cursor is inside thead
    }
    return (0, table_utils_1.addRowAfter)(state, dispatch, view);
};
const addRow = {
    isEnable: addRowAfter,
    run: addRowAfter,
};
const deleteRow = {
    isEnable: table_utils_1.removeCurrentRow,
    run: table_utils_1.removeCurrentRow,
};
const addColumn = {
    isEnable: table_utils_1.addColumnAfter,
    run: table_utils_1.addColumnAfter,
};
const deleteColumn = {
    isEnable: table_utils_1.removeCurrentColumn,
    run: table_utils_1.removeCurrentColumn,
};
exports.innerActions = (0, actions_1.defineActions)({
    setCellLeftAlign: cellAlign_1.setCellLeftAlign,
    setCellCenterAlign: cellAlign_1.setCellCenterAlign,
    setCellRightAlign: cellAlign_1.setCellRightAlign,
    addRow,
    deleteRow,
    addColumn,
    deleteColumn,
});
//# sourceMappingURL=innerActions.js.map
