import { IIdentityProvider } from "../list/list.js"; import { IIndexTreeModelOptions, IIndexTreeModelSpliceOptions } from "./indexTreeModel.js"; import { ICollapseStateChangeEvent, IObjectTreeElement, ITreeListSpliceData, ITreeModel, ITreeModelSpliceEvent, ITreeNode, ITreeSorter } from "./tree.js"; import { Event } from "../../../common/event.js"; export type ITreeNodeCallback = (node: ITreeNode) => void; export interface IObjectTreeModel extends ITreeModel { setChildren(element: T | null, children: Iterable> | undefined, options?: IObjectTreeModelSetChildrenOptions): void; resort(element?: T | null, recursive?: boolean): void; } export interface IObjectTreeModelSetChildrenOptions extends IIndexTreeModelSpliceOptions { } export interface IObjectTreeModelOptions extends IIndexTreeModelOptions { readonly sorter?: ITreeSorter; readonly identityProvider?: IIdentityProvider; } export declare class ObjectTreeModel implements IObjectTreeModel { private user; readonly rootRef: null; private model; private nodes; private readonly nodesByIdentity; private readonly identityProvider?; private sorter?; readonly onDidSpliceModel: Event>; readonly onDidSpliceRenderedNodes: Event>; readonly onDidChangeCollapseState: Event>; readonly onDidChangeRenderNodeCount: Event>; get size(): number; constructor(user: string, options?: IObjectTreeModelOptions); setChildren(element: T | null, children?: Iterable>, options?: IObjectTreeModelSetChildrenOptions): void; private _setChildren; private preserveCollapseState; rerender(element: T | null): void; resort(element?: T | null, recursive?: boolean): void; private resortChildren; getFirstElementChild(ref?: T | null): T | null | undefined; getLastElementAncestor(ref?: T | null): T | null | undefined; has(element: T | null): boolean; getListIndex(element: T | null): number; getListRenderCount(element: T | null): number; isCollapsible(element: T | null): boolean; setCollapsible(element: T | null, collapsible?: boolean): boolean; isCollapsed(element: T | null): boolean; setCollapsed(element: T | null, collapsed?: boolean, recursive?: boolean): boolean; expandTo(element: T | null): void; refilter(): void; getNode(element?: T | null): ITreeNode; getNodeLocation(node: ITreeNode): T | null; getParentNodeLocation(element: T | null): T | null; private getElementLocation; }