/**
 * DiffCalculator — computes alive-ness transitions and dot reverse
 * indices for an ORSet/state pair.
 *
 * Pure helpers — no state mutation. Used by the reducer's
 * applyWithDiff path and by ReceiptBuilder's *Remove outcome paths
 * (which share the same reverse-index walk).
 *
 * The class exposes only static methods, so there is no instance state
 * or constructor-time freeze contract to satisfy here.
 *
 * @module domain/services/DiffCalculator
 */
import type ORSet from '../crdt/ORSet.ts';
import type WarpState from './state/WarpState.ts';
import type { MutablePatchDiff } from '../types/PatchDiff.ts';
export default class DiffCalculator {
    /**
     * Builds a reverse map from encoded dot → element ID.
     *
     * Only includes mappings for dots in `targetDots`, so callers can
     * early-terminate the inner loop once every target is accounted for.
     */
    static buildDotToElement(orset: ORSet, targetDots: ReadonlySet<string>): Map<string, string>;
    /**
     * Collects the set of currently-alive elements that own at least one
     * of `observedDots`. Uses `buildDotToElement` for an O(total_dots +
     * |observedDots|) walk instead of O(N * |observedDots|).
     */
    static aliveElementsForDots(orset: ORSet, observedDots: ReadonlySet<string>): Set<string>;
    /**
     * Records removal only for nodes that were alive BEFORE the op AND
     * are dead AFTER. Mutates `diff.nodesRemoved`.
     */
    static collectNodeRemovals(diff: MutablePatchDiff, state: WarpState, aliveBeforeNodes: ReadonlySet<string> | undefined): void;
    /**
     * Records removal only for edges that were alive BEFORE the op AND
     * are dead AFTER. Mutates `diff.edgesRemoved`.
     */
    static collectEdgeRemovals(diff: MutablePatchDiff, state: WarpState, aliveBeforeEdges: ReadonlySet<string> | undefined): void;
}
