import type { NodeStatus, SidebarNode } from "./types.js";
/**
 * Search for nodes that match a search term
 * @param nodes - The array of nodes to search through
 * @param searchTerm - The term to search for
 * @param searchType - The search algorithm to use (depth-first or breadth-first)
 * @returns An array of nodes that match the search term
 */
export declare const nodesSearch: (nodes: SidebarNode[], searchTerm: string, searchType?: "dfs" | "bfs") => SidebarNode[];
/**
 * Get a set of node IDs that should be expanded to show nodes up to a specific level
 * @param items - The array of nodes to process
 * @param level - The level to expand to (1-indexed)
 * @returns A Set of node IDs that should be expanded
 */
export declare const getOpenLevels: (items: SidebarNode[], level: number) => Set<string>;
/**
 * Check if all nodes up to a specific level are expanded
 * @param items - The array of nodes to check
 * @param expandedNodes - A Set of node IDs that are currently expanded
 * @param level - The level to check (1-indexed)
 * @returns True if all nodes up to the specified level are expanded
 */
export declare const isOpenLevel: (items: SidebarNode[], expandedNodes: Set<string>, level: number) => boolean;
/**
 * Find the path from the root to a specific node
 * @param items - The array of nodes to search through
 * @param nodeId - The ID of the node to find
 * @returns An array representing the path to the node, or null if not found
 */
export declare const getNodePath: (items: SidebarNode[], nodeId: string) => Array<SidebarNode> | null;
/**
 * Calculate the maximum depth of a tree of nodes
 * @param items - The array of nodes to process
 * @returns The maximum depth of the tree
 */
export declare const getMaxDepth: (items: SidebarNode[]) => number;
/**
 * Filter nodes based on their status
 * @param nodes - The array of nodes to filter
 * @param statuses - The array of statuses to include
 * @returns A filtered array of nodes
 */
export declare const filterStatuses: (nodes: SidebarNode[], statuses: NodeStatus[]) => SidebarNode[];
/**
 * Trigger a custom event
 * @param eventType - The type of event to trigger
 * @param data - The data to include with the event
 * @param element - The element to dispatch the event from
 */
export declare const triggerEvent: (eventType: string, data: unknown, element?: HTMLElement | Document | null) => void;
//# sourceMappingURL=utils.d.ts.map