/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import type { IIdCompressor } from "@fluidframework/id-compressor";
import type { LocalNodeIdentifier, StableNodeIdentifier } from "./nodeIdentifier.js";
/**
 * An object which handles the generation of node identifiers as well as conversion between their two types ({@link StableNodeIdentifier} and {@link LocalNodeIdentifier}).
 */
export interface NodeIdentifierManager {
    /**
     * Generate a {@link StableNodeIdentifier}.
     */
    generateLocalNodeIdentifier(): LocalNodeIdentifier;
    /**
     * Convert the given {@link StableNodeIdentifier} into its {@link LocalNodeIdentifier} form.
     */
    localizeNodeIdentifier(identifier: StableNodeIdentifier): LocalNodeIdentifier;
    /**
     * Convert the given {@link LocalNodeIdentifier} into its {@link StableNodeIdentifier} form.
     */
    stabilizeNodeIdentifier(identifier: LocalNodeIdentifier): StableNodeIdentifier;
    /**
     * Attempts to recompress a {@link StableNodeIdentifier}.
     * @param identifier - The identifier that is attempted to recompress.
     * @returns The `{@link LocalNodeIdentifier}` associated with `identifier` or undefined if the identifier was not generated by any session known to this compressor.
     */
    tryLocalizeNodeIdentifier(identifier: string): LocalNodeIdentifier | undefined;
}
/**
 * Creates a {@link NodeIdentifierManager} from the given {@link IIdCompressor}.
 * @param idCompressor - the compressor to use for identifier generation, compression, and decompression.
 * If undefined, then attempts to generate or convert identifiers will throw an error.
 */
export declare function createNodeIdentifierManager(idCompressor?: IIdCompressor | undefined): NodeIdentifierManager;
export declare function isStableNodeIdentifier(identifier: string): identifier is StableNodeIdentifier;
//# sourceMappingURL=nodeIdentifierManager.d.ts.map