/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { Client } from "./client";
import { ISegment, ReferencePosition } from "./mergeTree";
import { ICombiningOp, ReferenceType } from "./ops";
import { PropertySet } from "./properties";
export declare class LocalReference implements ReferencePosition {
    private readonly client;
    offset: number;
    refType: ReferenceType;
    static readonly DetachedPosition: number;
    properties: PropertySet | undefined;
    pairedRef?: LocalReference;
    segment: ISegment | undefined;
    constructor(client: Client, initSegment: ISegment, offset?: number, refType?: ReferenceType);
    min(b: LocalReference): LocalReference;
    max(b: LocalReference): LocalReference;
    compare(b: LocalReference): number;
    toPosition(): number;
    hasTileLabels(): boolean;
    hasRangeLabels(): boolean;
    hasTileLabel(label: string): boolean;
    hasRangeLabel(label: string): boolean;
    getTileLabels(): string[] | undefined;
    getRangeLabels(): string[] | undefined;
    isLeaf(): boolean;
    addProperties(newProps: PropertySet, op?: ICombiningOp): void;
    getClient(): Client;
    getSegment(): ISegment | undefined;
    getOffset(): number;
    getProperties(): PropertySet | undefined;
}
interface IRefsAtOffset {
    before?: LocalReference[];
    at?: LocalReference[];
    after?: LocalReference[];
}
export declare class LocalReferenceCollection {
    private readonly segment;
    static append(seg1: ISegment, seg2: ISegment): void;
    hierRefCount: number;
    private readonly refsByOffset;
    private refCount;
    constructor(segment: ISegment, initialRefsByfOffset?: (IRefsAtOffset | undefined)[]);
    [Symbol.iterator](): {
        next(): IteratorResult<LocalReference>;
        [Symbol.iterator](): any;
    };
    clear(): void;
    get empty(): boolean;
    addLocalRef(lref: LocalReference): void;
    removeLocalRef(lref: LocalReference): LocalReference | undefined;
    /**
     * Called by 'append()' implementations to append local refs from the given 'other' segment to the
     * end of 'this' segment.
     *
     * Note: This method should be invoked after the caller has ensured that segments can be merged,
     *       but before 'this' segment's cachedLength has changed, or the adjustment to the local refs
     *       will be incorrect.
     */
    append(other: LocalReferenceCollection): void;
    split(offset: number, splitSeg: ISegment): void;
    addBeforeTombstones(...refs: Iterable<LocalReference>[]): void;
    addAfterTombstones(...refs: Iterable<LocalReference>[]): void;
}
export {};
//# sourceMappingURL=localReference.d.ts.map