import { parseCellAddress } from '@bilig/formula';
export function cellTouchesOperationPivotSource(input) {
    if (!input.workbook.hasPivots()) {
        return false;
    }
    return input.workbook.listPivots().some((pivot) => {
        if (!pivot.source) {
            return false;
        }
        if (pivot.source.sheetName !== input.sheetName) {
            return false;
        }
        const start = parseCellAddress(pivot.source.startAddress, pivot.source.sheetName);
        const end = parseCellAddress(pivot.source.endAddress, pivot.source.sheetName);
        return input.row >= start.row && input.row <= end.row && input.col >= start.col && input.col <= end.col;
    });
}
//# sourceMappingURL=operation-pivot-source-helpers.js.map