import { type ChildPart, type DirectiveParameters } from 'lit/directive.js';
import { type DirectiveArgs, DirectiveBase } from '../Abstracts/DirectiveBase';
/**
 * A template function to render a node with its rendered children.
 *
 * @public
 */
export type TreeParentTemplateFn<T> = (node: T, children: Array<unknown>) => unknown;
/**
 * A template function to render a leaf node (with no children).
 *
 * @public
 */
export type TreeChildTemplateFn<T> = (node: T) => unknown;
/**
 * Configuration options for the tree directive.
 *
 * @public
 */
export interface ITreeOptions<T> {
    /**
     * Optional predicate to filter nodes. Return `false` to exclude a node and its subtree.
     */
    filter?: (node: T) => boolean;
    /**
     * Optional comparator to sort children at each tree level.
     */
    sort?: (a: T, b: T) => number;
}
/**
 * Generic recursive rendering directive for tree structures.
 *
 * @private
 */
declare class TreeDirective<T> extends DirectiveBase {
    constructor(args: DirectiveArgs);
    /**
     * @public
     */
    render(root: T, childSelector: (node: T) => Array<T> | undefined, renderParent: TreeParentTemplateFn<T>, renderChild: TreeChildTemplateFn<T>, options?: ITreeOptions<T>): unknown;
    /**
     * @public
     */
    update(_part: ChildPart, [root, childSelector, renderParent, renderChild, options]: DirectiveParameters<this>): unknown;
    /**
     * @private
     */
    private renderNode;
}
/**
 * Renders recursive tree-like structures with optional filtering and sorting.
 *
 * @public
 * @param root - Root node to start recursion.
 * @param childSelector - Function to extract children from each node.
 * @param renderParent - Template for nodes with children.
 * @param renderChild - Template for leaf nodes.
 * @param options - Optional filter and sort logic.
 */
export declare const tree: <T>(...values: Parameters<TreeDirective<T>["render"]>) => any;
export {};
//# sourceMappingURL=TreeDirective.d.ts.map