/**
 * Calculates the total height of the merged cell.
 *
 * @param {Core} hotInstance The Handsontable instance.
 * @param {*} row The merged cell's row index.
 * @param {*} rowspan The merged cell height.
 * @returns {number}
 */ export function sumCellsHeights(hotInstance, row, rowspan) {
    const { rowIndexMapper, stylesHandler } = hotInstance;
    let height = 0;
    for(let i = row; i < row + rowspan; i++){
        if (!rowIndexMapper.isHidden(i)) {
            height += hotInstance.getRowHeight(i) ?? stylesHandler.getDefaultRowHeight(i);
        }
    }
    return height;
}
