/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { ChangeAtomId, ChangesetLocalId, RevisionTag, TaggedChange } from "../../../core/index.js";
import { RegisterId, OptionalChangeset } from "../../../feature-libraries/optional-field/index.js";
export interface ProtoChange {
    type: "write";
    content: RegisterId;
}
export declare const Change: {
    /**
     * @returns An empty changeset
     */
    empty: () => OptionalChangeset<never>;
    /**
     * @param src - The register to move a node from. The register must be full in the input context of the changeset.
     * @param dst - The register to move that node to.
     * The register must be empty in the input context of the changeset, or emptied as part of the changeset.
     * @returns A changeset that moves a node from src to dst.
     */
    move: (src: RegisterId | ChangesetLocalId, dst: RegisterId | ChangesetLocalId) => OptionalChangeset<never> | ProtoChange;
    /**
     * @param target - The register remove a node from. The register must be full in the input context of the changeset.
     * @param dst - The register to move the contents of the target register to.
     * The register must be empty in the input context of the changeset, or emptied as part of the changeset.
     * @returns A changeset that clears a register and moves the contents to another register.
     */
    clear: (target: RegisterId | ChangesetLocalId, dst: ChangeAtomId | ChangesetLocalId) => OptionalChangeset<never>;
    /**
     * @param target - The register to reserve. The register must NOT be full in the input context of the changeset.
     * @param dst - The register that the contents of the target register should be moved to should it become populated.
     * The register must be empty in the input context of the changeset, or emptied as part of the changeset.
     * @returns A changeset that reserves an register.
     */
    reserve: (target: RegisterId | ChangesetLocalId, dst: ChangeAtomId | ChangesetLocalId) => OptionalChangeset<never>;
    /**
     * @param location - The register that contains the child node to be changed.
     * That register must be full in the input context of the changeset.
     * @param change - A change to apply to a child node.
     * @returns A changeset that applies the given change to the child node in the given register.
     */
    childAt: <TChild>(location: RegisterId | ChangesetLocalId, change: TChild) => OptionalChangeset<TChild>;
    /**
     * @param change - A change to apply to a child node in the "self" register.
     * @returns A changeset that applies the given change to the child node in the "self" register.
     * The "self" register must be full in the input context of the changeset.
     */
    child: <TChild_1>(change: TChild_1) => OptionalChangeset<TChild_1>;
    /**
     * Combines multiple changesets for the same input context into a single changeset.
     * @param changes - The change to apply as part of the changeset. Interpreted as applying to the same input context.
     * @returns A single changeset that applies all of the given changes.
     */
    atOnce: <TChild_2>(...changes: (ProtoChange | OptionalChangeset<TChild_2>)[]) => OptionalChangeset<TChild_2>;
};
export declare function assertTaggedEqual(a: TaggedChange<OptionalChangeset> | undefined, b: TaggedChange<OptionalChangeset> | undefined): void;
export declare function assertEqual(a: OptionalChangeset | undefined, b: OptionalChangeset | undefined): void;
export declare function taggedRegister(id: RegisterId, revision: RevisionTag | undefined): RegisterId;
export declare function taggedAtomId(id: ChangeAtomId, revision: RevisionTag | undefined): ChangeAtomId;
export declare function verifyContextChain(a: TaggedChange<OptionalChangeset>, b: TaggedChange<OptionalChangeset>): void;
//# sourceMappingURL=optionalFieldUtils.d.ts.map