/**
 * Wrapping + adapter helpers shared by `tree-combobox-single` and
 * `tree-combobox-multi`. The whole tree comes from `dataSource` in one
 * shot, so wrapping is a pure walk over CEL-derived children: each raw
 * node either has children (`branch`) or it doesn't (`terminal`).
 */
export type WrappedNode = {
    readonly kind: 'branch';
    readonly raw: unknown;
    readonly key: string;
    readonly children: WrappedNode[];
} | {
    readonly kind: 'terminal';
    readonly raw: unknown;
    readonly key: string;
};
export interface WrapStructureContext {
    /** Stringified node id; one per raw node. Reuses `nodeKey` CEL. */
    nodeKey: (raw: unknown) => string;
    /**
     * Normalised children array. `undefined`/`null`/empty all collapse to
     * `undefined` here — the wrapping logic interprets that as
     * "this node has no children" → `terminal`.
     */
    nodeChildren: (raw: unknown) => unknown[] | undefined;
}
export declare function wrapStructural(raw: unknown, ctx: WrapStructureContext): WrappedNode;
export declare function wrapStructuralAll(raws: unknown[], ctx: WrapStructureContext): WrappedNode[];
/** Synchronous `getChildren` adapter for ui/tree. */
export declare function getWrappedChildren(w: WrappedNode): WrappedNode[] | undefined;
/**
 * Find the path from root to a node whose `key` matches. Returns `null`
 * if the key isn't present in `roots`.
 */
export declare function findWrappedPath(roots: WrappedNode[], key: string): WrappedNode[] | null;
