/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { FieldKey } from "../schema-stored";
import { ICodecOptions } from "../../codec";
import { PlaceIndex, Range } from "./pathTree";
import { DetachedFieldIndex } from "./detachedFieldIndex";
import { DeltaVisitor } from "./visitDelta";
import { ProtoNodes, Root } from "./delta";
export declare function makeDetachedFieldIndex(prefix?: string, options?: ICodecOptions): DetachedFieldIndex;
export declare function applyDelta(delta: Root, deltaProcessor: {
    acquireVisitor: () => DeltaVisitor;
}, detachedFieldIndex: DetachedFieldIndex): void;
export declare function announceDelta(delta: Root, deltaProcessor: {
    acquireVisitor: () => DeltaVisitor & AnnouncedVisitor;
}, detachedFieldIndex: DetachedFieldIndex): void;
export declare function combineVisitors(visitors: readonly DeltaVisitor[], announceVisitors?: readonly AnnouncedVisitor[]): DeltaVisitor;
/**
 * Visitor that is notified of changes before, after, and when changes are made.
 * Must be freed after use.
 * @alpha
 */
export interface AnnouncedVisitor {
    /**
     * A hook that is called after all nodes have been created.
     */
    afterCreate(content: ProtoNodes, destination: FieldKey): void;
    beforeDestroy(field: FieldKey, count: number): void;
    beforeAttach(source: FieldKey, count: number, destination: PlaceIndex): void;
    afterAttach(source: FieldKey, destination: Range): void;
    beforeDetach(source: Range, destination: FieldKey): void;
    afterDetach(source: PlaceIndex, count: number, destination: FieldKey): void;
    beforeReplace(newContent: FieldKey, oldContent: Range, oldContentDestination: FieldKey): void;
    afterReplace(newContentSource: FieldKey, newContent: Range, oldContent: FieldKey): void;
}
//# sourceMappingURL=visitorUtils.d.ts.map