/**
 * DevExtreme (esm/ui/html_editor/utils/table_helper.js)
 * Version: 21.1.7 (build 22012-0313)
 * Build date: Wed Jan 12 2022
 *
 * Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED
 * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
 */
var TABLE_FORMATS = ["table", "tableHeaderCell"];
var TABLE_OPERATIONS = ["insertTable", "insertHeaderRow", "insertRowAbove", "insertRowBelow", "insertColumnLeft", "insertColumnRight", "deleteColumn", "deleteRow", "deleteTable"];

function getTableFormats(quill) {
    var tableModule = quill.getModule("table");
    return null !== tableModule && void 0 !== tableModule && tableModule.tableFormats ? tableModule.tableFormats() : TABLE_FORMATS
}

function getTableOperationHandler(quill, operationName) {
    for (var _len = arguments.length, rest = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
        rest[_key - 2] = arguments[_key]
    }
    return () => {
        var table = quill.getModule("table");
        if (!table) {
            return
        }
        quill.focus();
        return table[operationName](...rest)
    }
}
export {
    TABLE_OPERATIONS,
    getTableFormats,
    getTableOperationHandler
};
