/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { LocalReferencePosition } from "./localReference";
import { ISegment } from "./mergeTreeNodes";
export declare type Trackable = ISegment | LocalReferencePosition;
export interface ITrackingGroup {
    tracked: readonly Trackable[];
    size: number;
    has(trackable: Trackable): boolean;
    link(trackable: Trackable): void;
    unlink(trackable: Trackable): boolean;
}
export declare class TrackingGroup implements ITrackingGroup {
    private readonly trackedSet;
    constructor();
    /**
     * @deprecated - use tracked instead.
     * For references positions this will return the underlying segment,
     * which may not match the intention
     */
    get segments(): readonly ISegment[];
    get tracked(): readonly Trackable[];
    get size(): number;
    has(trackable: Trackable): boolean;
    link(trackable: Trackable): void;
    unlink(trackable: Trackable): boolean;
}
/**
 * Tracking group backed by an unordered set. Lookup, insertion, and deletion are O(1)
 */
export declare class UnorderedTrackingGroup implements ITrackingGroup {
    private readonly trackedSet;
    constructor();
    get tracked(): readonly Trackable[];
    get size(): number;
    has(trackable: Trackable): boolean;
    link(trackable: Trackable): void;
    unlink(trackable: Trackable): boolean;
}
export declare class TrackingGroupCollection {
    private readonly trackable;
    private readonly _trackingGroups;
    get trackingGroups(): Set<TrackingGroup>;
    constructor(trackable: Trackable);
    link(trackingGroup: ITrackingGroup): void;
    unlink(trackingGroup: ITrackingGroup): boolean;
    copyTo(trackable: Trackable): void;
    get empty(): boolean;
    matches(trackingCollection: TrackingGroupCollection): boolean;
}
//# sourceMappingURL=mergeTreeTracking.d.ts.map