import type { EngineOp } from '@bilig/workbook';
import { type OpOrder } from '../../replica-state.js';
export interface VersionStore {
    get(key: string): OpOrder | undefined;
    set(key: string, value: OpOrder): void;
}
export declare const noopVersionStore: VersionStore;
export interface OperationReplicaVersionWriter {
    readonly stores: {
        readonly entityVersions: VersionStore;
        readonly sheetDeleteVersions: VersionStore;
    };
    readonly setEntityVersionForOp: (op: EngineOp, order: OpOrder) => void;
    readonly setCellEntityVersion: (sheetName: string, address: string, order: OpOrder) => void;
    readonly setSheetDeleteVersion: (sheetName: string, order: OpOrder) => void;
}
export declare function createOperationReplicaVersionWriter(input: {
    readonly trackReplicaVersions: boolean;
    readonly entityVersions: VersionStore;
    readonly sheetDeleteVersions: VersionStore;
}): OperationReplicaVersionWriter;
export declare function entityKeyForOp(op: EngineOp): string;
export declare function sheetDeleteBarrierForOp(op: EngineOp, sheetDeleteVersions: VersionStore): OpOrder | undefined;
export declare function shouldApplyOp(op: EngineOp, order: OpOrder, stores: {
    readonly entityVersions: VersionStore;
    readonly sheetDeleteVersions: VersionStore;
}): boolean;
