/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { type TreeIndexNodes, type TreeIndex, type TreeIndexKey } from "../../feature-libraries/index.js";
import type { ImplicitFieldSchema } from "../fieldSchema.js";
import { type TreeNode, type TreeNodeSchema, type NodeFromSchema } from "../core/index.js";
import type { TreeView } from "./tree.js";
/**
 * A {@link TreeIndex} that returns tree nodes given their associated keys.
 *
 * @alpha
 */
export type SimpleTreeIndex<TKey extends TreeIndexKey, TValue> = TreeIndex<TKey, TValue>;
/**
 * Creates a {@link SimpleTreeIndex} with a specified indexer.
 *
 * @param view - the view for the tree being indexed
 * @param indexer - a function that takes in a {@link TreeNodeSchema} and returns the field name that all nodes of the given schema
 * should be keyed on, must be pure and functional
 * @param getValue - given at least one {@link TreeNode}, returns an associated value
 * @param isKeyValid - function for verifying the validity of the key retrieved based on the information given by the indexer
 *
 * @alpha
 */
export declare function createSimpleTreeIndex<TFieldSchema extends ImplicitFieldSchema, TKey extends TreeIndexKey, TValue>(view: TreeView<TFieldSchema>, indexer: (schema: TreeNodeSchema) => string | undefined, getValue: (nodes: TreeIndexNodes<TreeNode>) => TValue, isKeyValid: (key: TreeIndexKey) => key is TKey): SimpleTreeIndex<TKey, TValue>;
/**
 * Creates a {@link SimpleTreeIndex} with a specified indexer.
 *
 * @param view - the view for the tree being indexed
 * @param indexer - a function that takes in a {@link TreeNodeSchema} and returns the field name that all nodes of the given schema
 * should be keyed on, must be pure and functional
 * @param getValue - given at least one {@link TreeNode}, returns an associated value
 * @param isKeyValid - function for verifying the validity of the key retrieved based on the information given by the indexer
 * @param indexableSchema - a list of all the schema types that can be indexed
 *
 * @alpha
 */
export declare function createSimpleTreeIndex<TFieldSchema extends ImplicitFieldSchema, TKey extends TreeIndexKey, TValue, TSchema extends TreeNodeSchema>(view: TreeView<TFieldSchema>, indexer: (schema: TSchema) => string | undefined, getValue: (nodes: TreeIndexNodes<NodeFromSchema<TSchema>>) => TValue, isKeyValid: (key: TreeIndexKey) => key is TKey, indexableSchema: readonly TSchema[]): SimpleTreeIndex<TKey, TValue>;
/**
 * Creates a {@link SimpleTreeIndex} with a specified indexer.
 *
 * @param view - the view for the tree being indexed
 * @param indexer - a map from {@link TreeNodeSchema} to the field name that all nodes of the given schema
 * should be keyed on
 * @param getValue - given at least one {@link TreeNode}, returns an associated value
 * @param isKeyValid - function for verifying the validity of the key retrieved based on the information given by the indexer
 *
 * @alpha
 */
export declare function createSimpleTreeIndex<TFieldSchema extends ImplicitFieldSchema, TKey extends TreeIndexKey, TValue>(view: TreeView<TFieldSchema>, indexer: Map<TreeNodeSchema, string>, getValue: (nodes: TreeIndexNodes<TreeNode>) => TValue, isKeyValid: (key: TreeIndexKey) => key is TKey): SimpleTreeIndex<TKey, TValue>;
/**
 * Creates a {@link SimpleTreeIndex} with a specified indexer.
 *
 * @param view - the view for the tree being indexed
 * @param indexer - a map from {@link TreeNodeSchema} to the field name that all nodes of the given schema
 * should be keyed on
 * @param getValue - given at least one {@link TreeNode}, returns an associated value
 * @param isKeyValid - function for verifying the validity of the key retrieved based on the information given by the indexer
 * @param indexableSchema - a list of all the schema types that can be indexed
 *
 * @alpha
 */
export declare function createSimpleTreeIndex<TFieldSchema extends ImplicitFieldSchema, TKey extends TreeIndexKey, TValue, TSchema extends TreeNodeSchema>(view: TreeView<TFieldSchema>, indexer: Map<TreeNodeSchema, string>, getValue: (nodes: TreeIndexNodes<NodeFromSchema<TSchema>>) => TValue, isKeyValid: (key: TreeIndexKey) => key is TKey, indexableSchema: readonly TSchema[]): SimpleTreeIndex<TKey, TValue>;
//# sourceMappingURL=simpleTreeIndex.d.ts.map