/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { type ChangeAtomId, type FieldKey, type FieldUpPath, type UpPath, type TreeChunk } from "../../core/index.js";
import type { DetachedRootIds, DataEditor, OptionalFieldEditor, RequiredFieldEditor, SequenceFieldEditor } from "./defaultEditBuilder.js";
export type DetachedRootLocation = FieldKey;
export type DetachedRootsLocation = readonly DetachedRootRangeLocation[];
export interface DetachedRootRangeLocation {
    readonly field: FieldKey;
    readonly count: number;
}
export interface Locator {
    locationFromId(id: ChangeAtomId): DetachedRootLocation;
    idFromLocation(id: DetachedRootLocation): ChangeAtomId;
    locationsFromIdRanges(id: DetachedRootIds): DetachedRootsLocation;
    idRangesFromLocations(id: DetachedRootsLocation): DetachedRootIds;
}
export type ILocationBasedDataEditor = DataEditor<TreeChunk, DetachedRootLocation, DetachedRootsLocation>;
/**
 * Implementation of {@link DataEditor} based on the default set of supported field kinds.
 * @sealed
 */
export declare class LocationBasedDataEditor implements DataEditor<TreeChunk, DetachedRootLocation, DetachedRootsLocation> {
    private readonly idBasedEditor;
    private readonly locator;
    constructor(idBasedEditor: DataEditor<TreeChunk, ChangeAtomId, DetachedRootIds>, locator: Locator);
    addNodeExistsConstraint(path: UpPath): void;
    addNodeExistsConstraintOnRevert(path: UpPath): void;
    buildRoots(content: TreeChunk): DetachedRootsLocation;
    valueField(field: FieldUpPath): RequiredFieldEditor<TreeChunk, DetachedRootLocation>;
    optionalField(field: FieldUpPath): OptionalFieldEditor<TreeChunk, DetachedRootLocation>;
    move(sourceField: FieldUpPath, sourceIndex: number, count: number, destinationField: FieldUpPath, destIndex: number): void;
    sequenceField(field: FieldUpPath): SequenceFieldEditor<TreeChunk, DetachedRootsLocation>;
}
//# sourceMappingURL=locationBasedEditBuilder.d.ts.map