/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
import { IIntegerRange } from "../base";
import { IRBAugmentation, IRBMatcher, RBNode, RedBlackTree } from "./rbTree";
/**
 * @deprecated  for internal use only. public export will be removed.
 * @internal
 */
export interface AugmentedIntervalNode {
    minmax: IInterval;
}
/**
 * @deprecated  for internal use only. public export will be removed.
 * @internal
 */
export declare const integerRangeToString: (range: IIntegerRange) => string;
/**
 * @deprecated  for internal use only. public export will be removed.
 * @internal
 */
export interface IInterval {
    clone(): IInterval;
    compare(b: IInterval): number;
    compareStart(b: IInterval): number;
    compareEnd(b: IInterval): number;
    modify(label: string, start: number, end: number, op?: ISequencedDocumentMessage, localSeq?: number): IInterval | undefined;
    overlaps(b: IInterval): boolean;
    union(b: IInterval): IInterval;
}
/**
 * @deprecated  for internal use only. public export will be removed.
 * @internal
 */
export declare type IntervalNode<T extends IInterval> = RBNode<T, AugmentedIntervalNode>;
/**
 * @deprecated  for internal use only. public export will be removed.
 * @internal
 */
export declare type IntervalConflictResolver<TInterval> = (a: TInterval, b: TInterval) => TInterval;
/**
 * @deprecated  for internal use only. public export will be removed.
 * @internal
 */
export declare class IntervalTree<T extends IInterval> implements IRBAugmentation<T, AugmentedIntervalNode>, IRBMatcher<T, AugmentedIntervalNode> {
    intervals: RedBlackTree<T, AugmentedIntervalNode>;
    remove(x: T): void;
    removeExisting(x: T): void;
    put(x: T, conflict?: IntervalConflictResolver<T>): void;
    map(fn: (x: T) => void): void;
    mapUntil(fn: (X: T) => boolean): void;
    mapBackward(fn: (x: T) => void): void;
    match(x: T): RBNode<T, AugmentedIntervalNode>[];
    matchNode(node: IntervalNode<T> | undefined, key: T): boolean;
    continueSubtree(node: IntervalNode<T> | undefined, key: T): boolean;
    update(node: IntervalNode<T>): void;
}
//# sourceMappingURL=intervalTree.d.ts.map