import { SerializableObject, DomainConceptName, RemeshDomainContext } from '../'; export type TreeModuleOptions = { name: DomainConceptName<'TreeModule'>; getKey: (node: T) => string; getChildren: (node: T) => T[] | null; setChildren: (node: T, children: T[]) => T; default?: T; }; export declare const findTreeNode: (root: T, options: TreeModuleOptions, id: string) => T | null; export declare const setTreeNode: (current: T, options: TreeModuleOptions, node: T) => T; export declare const removeTreeNode: (current: T, options: TreeModuleOptions, keys: string[]) => T | null; export declare const TreeModule: (domain: RemeshDomainContext, options: TreeModuleOptions) => { event: { SetChildrenFailedEvent: import("../remesh").RemeshSubscribeOnlyEvent<[{ key: string; message: string; }], { key: string; message: string; }>; RemoveTreeNodeFailedEvent: import("../remesh").RemeshSubscribeOnlyEvent<[{ keys: string[]; message: string; }], { keys: string[]; message: string; }>; }; query: { TreeRootQuery: import("../remesh").RemeshQuery<[], T | null>; TreeNodeQuery: import("../remesh").RemeshQuery<[key: string], T | null>; }; command: { SetTreeRootCommand: import("../remesh").RemeshCommand<[root: T]>; SetTreeNodeCommand: import("../remesh").RemeshCommand<[newNode: T]>; RemoveTreeNodeCommand: import("../remesh").RemeshCommand<[keys: string[]]>; SetChildrenCommand: import("../remesh").RemeshCommand<[{ key: string; children: T[]; }]>; AddChildrenCommand: import("../remesh").RemeshCommand<[{ key: string; children: T[]; }]>; }; };