import type { TreeNodeAction } from './tree-node-action'; import type { TreeNodeDragConfig } from './tree-node-drag-config.svelte'; export type TreeNodeInitializer = { name?: string; id?: string; nonSelectable?: boolean; initiallyExpanded?: boolean; expandOnDoubleClick?: boolean; /** Opaque metadata slot (e.g. an etag or sync token). Not rendered — purely for consumer bookkeeping. */ meta?: string | null; /** Destination route for this node. The kit does not navigate; read it in your selection handler (e.g. `goto(node.href)`). */ href?: string | null; icon?: string; imgIcon?: string; count?: number; hideIcon?: boolean; onNodeSelected?: (node: TreeNode, opt: { selectedExplicitly: boolean; }) => void; onNodeHover?: { mouseover: (node: TreeNode) => void; mouseleave: (node: TreeNode) => void; }; dragConfig?: TreeNodeDragConfig; children?: TreeNode[]; actions?: TreeNodeAction[]; }; export declare class TreeNode { id: string; name: string; icon: string; count?: number; expandOnDoubleClick: boolean; meta?: string | null; href?: string | null; private _dragConfig?; private _onNodeSelected?; private _onNodeHover?; private _imgIcon; private _hideIcon; private _expanded; private _selected; private _involvedIntoActivePath; private _actions; private _nonSelectable; private _children; private _parent?; private _forestRoots?; private _dirty; constructor(init: TreeNodeInitializer); /** Whether this node has unsaved changes; set via `setDirty` and propagated up to ancestors. */ get dirty(): boolean; get expanded(): boolean; get selected(): boolean; get children(): readonly TreeNode[]; get actions(): TreeNodeAction[]; get parent(): TreeNode | undefined; get nonSelectable(): boolean; get involvedIntoActivePath(): boolean; get imgIcon(): string; get hideIcon(): boolean; get dragConfig(): TreeNodeDragConfig | undefined; select(options?: { explicitly?: boolean; }): void; /** Register the full set of forest roots so single-select clears across sibling roots, not just this node's own root. Set by the `Tree` component. */ setForest(getRoots: () => readonly TreeNode[]): void; setChildren(value: TreeNode[]): void; addChild(child: TreeNode): void; insertChildAt(index: number, child: TreeNode): void; removeChild(child: TreeNode): void; setDirty(value: boolean): void; notifyHover(mouseOver: boolean): void; collapse(): void; expand(): void; unselect(): void; flatten(): TreeNode[]; canMoveToParent(targetParent: TreeNode): boolean; moveToFolder(targetFolder: TreeNode): boolean; private _refreshParentRefs; private _select; private _firstSelectable; private _unselectNodeAndChildren; private _buildChainToCurrentNode; }