/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import type { IFluidHandle } from "@fluidframework/core-interfaces";
import { type FixRecursiveArraySchema, type TreeNodeFromImplicitAllowedTypes } from "./simple-tree/index.js";
import type { JsonCompatible } from "./util/index.js";
/**
 * Utilities for storing {@link FluidSerializableAsTree.Data|Fluid Serializable data} in {@link TreeNode}s.
 *
 * Same as {@link JsonAsTree} except allows {@link @fluidframework/core-interfaces#(IFluidHandle:interface)}s.
 * @remarks
 * Schema which replicate the Fluid Serializable data model with {@link TreeNode}s.
 *
 * Fluid Serializable data can be imported from the {@link FluidSerializableAsTree.Data|Fluid Serializable format} into this format using {@link (TreeAlpha:interface).importConcise} with the {@link FluidSerializableAsTree.(Tree:variable)} schema.
 * @internal
 */
export declare namespace FluidSerializableAsTree {
    /**
     * Data which can be serialized by Fluid.
     * @remarks
     * Can be encoded as a {@link FluidSerializableAsTree.(Tree:type)} using {@link (TreeAlpha:interface).importConcise}.
     * @internal
     */
    type Data = JsonCompatible<IFluidHandle>;
    /**
     * {@link AllowedTypes} for any content allowed in the {@link FluidSerializableAsTree} domain.
     * @example
     * ```typescript
     * const tree = TreeAlpha.importConcise(FluidSerializableAsTree.Tree, { example: { nested: true }, value: 5 });
     * ```
     * @internal
     */
    const Tree: readonly [() => typeof FluidSerializableObject, () => typeof Array, import("./simple-tree/leafNodeSchema.js").LeafSchema<"string", string>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"number", number>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"null", null>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"handle", IFluidHandle<unknown>>];
    /**
     * @internal
     */
    type Tree = TreeNodeFromImplicitAllowedTypes<typeof Tree>;
    /**
     * Do not use. Exists only as a workaround for {@link https://github.com/microsoft/TypeScript/issues/59550} and {@link https://github.com/microsoft/rushstack/issues/4429}.
     * @system @internal
     */
    const _APIExtractorWorkaroundObjectBase: import("./simple-tree/index.js").TreeNodeSchemaClass<"com.fluidframework.serializable.object", import("./simple-tree/index.js").NodeKind.Map, import("./simple-tree/index.js").System_Unsafe.TreeMapNodeUnsafe<readonly [() => typeof FluidSerializableObject, () => typeof Array, import("./simple-tree/leafNodeSchema.js").LeafSchema<"string", string>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"number", number>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"null", null>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"handle", IFluidHandle<unknown>>]> & import("./simple-tree/index.js").WithType<"com.fluidframework.serializable.object", import("./simple-tree/index.js").NodeKind.Map, unknown>, {
        [Symbol.iterator](): Iterator<[string, string | number | IFluidHandle<unknown> | import("./simple-tree/index.js").System_Unsafe.InsertableTypedNodeUnsafe<import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>> | FluidSerializableObject | Array | null], any, undefined>;
    } | {
        readonly [x: string]: string | number | IFluidHandle<unknown> | import("./simple-tree/index.js").System_Unsafe.InsertableTypedNodeUnsafe<import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>> | FluidSerializableObject | Array | null;
    }, false, readonly [() => typeof FluidSerializableObject, () => typeof Array, import("./simple-tree/leafNodeSchema.js").LeafSchema<"string", string>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"number", number>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"null", null>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"handle", IFluidHandle<unknown>>], undefined>;
    /**
     * Arbitrary Fluid Serializable object as a {@link TreeNode}.
     * @remarks
     * API of the tree node is more aligned with an es6 map than a JS object using its properties like a map.
     * @example
     * ```typescript
     * // Due to TypeScript restrictions on recursive types, the constructor and be somewhat limiting.
     * const fromArray = new JsonAsTreeObject([["a", 0]]);
     * // Using `importConcise` can work better for Fluid Serializable data:
     * const imported = TreeAlpha.importConcise(FluidSerializableAsTree.Object, { a: 0 });
     * // Node API is like a Map:
     * const value = imported.get("a");
     * ```
     * @privateRemarks
     * Due to https://github.com/microsoft/TypeScript/issues/61270 this can't be named `Object`.
     * @sealed @internal
     */
    class FluidSerializableObject extends _APIExtractorWorkaroundObjectBase {
    }
    /**
     * D.ts bug workaround, see {@link FixRecursiveArraySchema}.
     * @privateRemarks
     * In the past this this had to reference the base type (_APIExtractorWorkaroundArrayBase).
     * Testing for this in examples/utils/import-testing now shows it has to reference FluidSerializableAsTree.Array instead.
     * @system @internal
     */
    type _RecursiveArrayWorkaroundJsonArray = FixRecursiveArraySchema<typeof Array>;
    /**
     * Do not use. Exists only as a workaround for {@link https://github.com/microsoft/TypeScript/issues/59550} and {@link https://github.com/microsoft/rushstack/issues/4429}.
     * @system @internal
     */
    const _APIExtractorWorkaroundArrayBase: import("./simple-tree/index.js").TreeNodeSchemaClass<"com.fluidframework.serializable.array", import("./simple-tree/index.js").NodeKind.Array, import("./simple-tree/index.js").System_Unsafe.TreeArrayNodeUnsafe<readonly [() => typeof FluidSerializableObject, () => typeof Array, import("./simple-tree/leafNodeSchema.js").LeafSchema<"string", string>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"number", number>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"null", null>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"handle", IFluidHandle<unknown>>]> & import("./simple-tree/index.js").WithType<"com.fluidframework.serializable.array", import("./simple-tree/index.js").NodeKind.Array, unknown>, {
        [Symbol.iterator](): Iterator<string | number | IFluidHandle<unknown> | import("./simple-tree/index.js").System_Unsafe.InsertableTypedNodeUnsafe<import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>> | FluidSerializableObject | Array | null, any, undefined>;
    }, false, readonly [() => typeof FluidSerializableObject, () => typeof Array, import("./simple-tree/leafNodeSchema.js").LeafSchema<"string", string>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"number", number>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"null", null>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"handle", IFluidHandle<unknown>>], undefined>;
    /**
     * Arbitrary Fluid Serializable array as a {@link TreeNode}.
     * @remarks
     * This can be imported using {@link (TreeAlpha:interface).importConcise}.
     * @example
     * ```typescript
     * // Due to TypeScript restrictions on recursive types, the constructor can be somewhat limiting.
     * const usingConstructor = new FluidSerializableAsTree.Array(["a", 0, new FluidSerializableAsTree.Array([1])]);
     * // Using `importConcise` can work better for Fluid Serializable data:
     * const imported = TreeAlpha.importConcise(FluidSerializableAsTree.Array, ["a", 0, [1]]);
     * // Node API is like an Array:
     * const inner: FluidSerializableAsTree.Tree = imported[2];
     * assert(Tree.is(inner, FluidSerializableAsTree.Array));
     * const leaf = inner[0];
     * ```
     * @sealed @internal
     */
    class Array extends _APIExtractorWorkaroundArrayBase {
    }
}
//# sourceMappingURL=serializableDomainSchema.d.ts.map