"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "triggerNodeModification", {
    enumerable: true,
    get: function() {
        return triggerNodeModification;
    }
});
const _errors = require("../../../../helpers/errors");
const _collapse = require("./collapse");
const _expand = require("./expand");
const _hideColumn = require("./hideColumn");
const _showColumn = require("./showColumn");
const availableModifiers = new Map([
    [
        'collapse',
        _collapse.collapseNode
    ],
    [
        'expand',
        _expand.expandNode
    ],
    [
        'hide-column',
        _hideColumn.hideColumn
    ],
    [
        'show-column',
        _showColumn.showColumn
    ]
]);
function triggerNodeModification(actionName, nodeToProcess, gridColumnIndex) {
    if (!availableModifiers.has(actionName)) {
        (0, _errors.throwWithCause)(`The node modifier action ("${actionName}") does not exist.`);
    }
    return availableModifiers.get(actionName)(nodeToProcess, gridColumnIndex);
}
