import { type CellRangeRef } from '@bilig/protocol';
import type { EngineOp } from '@bilig/workbook';
import type { OpOrder } from '../../replica-state.js';
import type { WorkbookStore } from '../../workbook-store.js';
import type { MutationSource } from './operation-service-types.js';
export type OperationStructuralMetadataOp = Extract<EngineOp, {
    kind: 'updateRowMetadata' | 'updateColumnMetadata' | 'setFreezePane' | 'clearFreezePane' | 'mergeCells' | 'unmergeCells' | 'setSheetProtection' | 'clearSheetProtection' | 'setFilter' | 'clearFilter' | 'setSort' | 'clearSort' | 'setDataValidation' | 'clearDataValidation' | 'upsertConditionalFormat' | 'deleteConditionalFormat' | 'setConditionalFormatArtifacts' | 'clearConditionalFormatArtifacts' | 'upsertRangeProtection' | 'deleteRangeProtection' | 'upsertCommentThread' | 'deleteCommentThread' | 'upsertNote' | 'deleteNote' | 'upsertHyperlink' | 'deleteHyperlink' | 'upsertCellStyle' | 'upsertCellNumberFormat' | 'setStyleRange' | 'setFormatRange' | 'upsertChart' | 'deleteChart' | 'upsertImage' | 'deleteImage' | 'upsertShape' | 'deleteShape';
}>;
type OperationStructuralMetadataWorkbook = Pick<WorkbookStore, 'setRowMetadata' | 'setColumnMetadata' | 'setFreezePane' | 'clearFreezePane' | 'setMergeRange' | 'clearMergeRanges' | 'setSheetProtection' | 'clearSheetProtection' | 'setFilter' | 'deleteFilter' | 'setSort' | 'deleteSort' | 'setDataValidation' | 'deleteDataValidation' | 'setConditionalFormat' | 'deleteConditionalFormat' | 'setConditionalFormatArtifacts' | 'deleteConditionalFormatArtifacts' | 'setRangeProtection' | 'deleteRangeProtection' | 'setCommentThread' | 'deleteCommentThread' | 'setNote' | 'deleteNote' | 'setHyperlink' | 'deleteHyperlink' | 'getCellStyle' | 'listStyleRanges' | 'upsertCellStyle' | 'upsertCellNumberFormat' | 'setStyleRange' | 'coalesceStyleRanges' | 'setFormatRange' | 'setChart' | 'deleteChart' | 'setImage' | 'deleteImage' | 'setShape' | 'deleteShape' | 'sheetsByName'>;
interface OperationStructuralMetadataInvalidationSpan {
    readonly sheetName: string;
    readonly startIndex: number;
    readonly endIndex: number;
}
export interface OperationStructuralMetadataChange {
    structuralInvalidation: boolean;
    invalidatedRanges: CellRangeRef[];
    invalidatedRows: OperationStructuralMetadataInvalidationSpan[];
    invalidatedColumns: OperationStructuralMetadataInvalidationSpan[];
}
export declare function applyOperationStructuralMetadataOp(args: {
    readonly workbook: OperationStructuralMetadataWorkbook;
    readonly op: OperationStructuralMetadataOp;
    readonly order: OpOrder;
    readonly source: MutationSource;
    readonly setEntityVersionForOp: (op: EngineOp, order: OpOrder) => void;
}): OperationStructuralMetadataChange;
export {};
