import type { UmbTreeItemPickerBreadcrumbItem } from '../components/tree-item-picker-breadcrumb/index.js'; import type { UmbTreeItemModel, UmbTreeRootModel, UmbTreeStartNode } from '../types.js'; import type { UmbEntityModel } from '../../entity/index.js'; import { UmbControllerBase } from '../../../../libs/class-api/index.js'; import type { UmbControllerHost } from '../../../../libs/controller-api/index.js'; import type { UmbInteractionMemoryManager } from '../../interaction-memory/index.js'; /** * The node a picker is browsing. It is the tree's own model of that node, so anything a consumer derives from it — the * collection a content type configures, for instance — describes the node being browsed and cannot describe another. * * The tree root is a location like any other, which is what lets an undefined location mean only that the picker has * not established one. */ export type UmbTreeItemPickerLocation = UmbTreeItemModel | UmbTreeRootModel; /** * Construction arguments for {@link UmbTreeItemPickerLocationManager}. */ export interface UmbTreeItemPickerLocationManagerArgs { /** * When provided, the location the user left the picker in is remembered and restored. */ interactionMemoryManager?: UmbInteractionMemoryManager; } /** * Tracks where in a tree a picker is browsing: the trail to it, the node itself, and the memory of both. */ export declare class UmbTreeItemPickerLocationManager extends UmbControllerBase { #private; readonly breadcrumb: import("rxjs").Observable; /** * Where the picker is browsing, as a tri-state: * * - `undefined` — no location established yet. * - `null` — the node last browsed to is not in the tree. A host should say so rather than show a level it cannot * describe, and must not treat this as still loading. * - a model — the node being browsed. */ readonly currentLocation: import("rxjs").Observable; /** * @param {UmbControllerHost} host - The controller host this manager is bound to. * @param {UmbTreeItemPickerLocationManagerArgs} [args] - Optional construction arguments. */ constructor(host: UmbControllerHost, args?: UmbTreeItemPickerLocationManagerArgs); /** * Sets the node the picker may not browse above. Set it before the tree alias, as the alias starts the load. * @param {UmbTreeStartNode} [startNode] - The node to start from, or undefined to browse from the tree root. * @memberof UmbTreeItemPickerLocationManager */ setStartNode(startNode: UmbTreeStartNode | undefined): void; /** * Sets the tree to browse, which resolves its repository and loads the initial trail. * @param {string} [treeAlias] - The alias of the tree. * @memberof UmbTreeItemPickerLocationManager */ setTreeAlias(treeAlias: string | undefined): void; /** * Returns the node currently being browsed. * @returns {UmbTreeItemPickerLocation | null | undefined} The current location, undefined before one is established, * or null when the node last browsed to is not in the tree. * @memberof UmbTreeItemPickerLocationManager */ getCurrentLocation(): UmbTreeItemPickerLocation | null | undefined; /** * Returns the trail to the node currently being browsed. * @returns {Array} The trail, ending with the node being browsed. * @memberof UmbTreeItemPickerLocationManager */ getBreadcrumb(): Array; /** * Browses to a node, leaving the trail, the current location and the remembered location consistent with each other. * * A node already in the trail is browsed by shortening the trail to it, so stepping back up costs no request. A node * the tree does not have leaves the current location `null`. * @param {UmbEntityModel} [entity] - The node to browse, or undefined for the start node when there is one and the * tree root otherwise. * @returns {Promise} Resolves once the trail and the current location have been set. * @memberof UmbTreeItemPickerLocationManager */ navigateTo(entity?: UmbEntityModel): Promise; }