import type { Event } from '@difizen/mana-common'; import { Emitter } from '@difizen/mana-common'; import type { TreeNode } from './tree'; import { Tree } from './tree'; import { TreeSelectionService, SelectableTreeNode, TreeSelection } from './tree-selection'; import { TreeSelectionState } from './tree-selection-state'; export declare class TreeSelectionServiceImpl implements TreeSelectionService { protected readonly tree: Tree; constructor(tree: Tree); protected readonly onSelectionChangedEmitter: Emitter[]>; protected state?: TreeSelectionState; protected init(): void; dispose(): void; get selectedNodes(): readonly Readonly[]; get onSelectionChanged(): Event[]>; protected fireSelectionChanged(): void; addSelection(selectionOrTreeNode: TreeSelection | Readonly): void; protected transiteTo(newState: TreeSelectionState): void; protected unselect(nodes: readonly SelectableTreeNode[]): void; protected select(nodes: readonly SelectableTreeNode[]): void; protected removeFocus(...nodes: (readonly SelectableTreeNode[])[]): void; protected addFocus(node: SelectableTreeNode | undefined): void; /** * Returns an array of the difference of two arrays. The returned array contains all elements that are contained by * `left` and not contained by `right`. `right` may also contain elements not present in `left`: these are simply ignored. */ protected difference(left: readonly T[], right: readonly T[]): readonly T[]; /** * Returns a reference to the argument if the node exists in the tree. Otherwise, `undefined`. */ protected validateNode(node: Readonly): Readonly | undefined; storeState(): TreeSelectionServiceImpl.State; restoreState(state: Record): void; } export declare namespace TreeSelectionServiceImpl { type State = { selectionStack: readonly FocusableTreeSelectionState[]; }; type FocusableTreeSelectionState = { focus?: string | undefined; node?: string | undefined; type?: TreeSelection.SelectionType | undefined; }; } //# sourceMappingURL=tree-selection-impl.d.ts.map