import * as react_jsx_runtime from 'react/jsx-runtime'; import { TreeDataItem, TreeDataItemWithMeta } from './types.cjs'; import 'react'; /** * Get all descendant node IDs of a node */ declare function getDescendantIds(itemId: string, data: TreeDataItemWithMeta[], childrenMap: Map): string[]; /** * Get all ancestor node IDs of a node */ declare function getAncestorIds(itemId: string, data: TreeDataItemWithMeta[]): string[]; /** * Check if a node is indirectly selected (parent node is selected) */ declare function isIndirectlySelected(itemId: string, selectedIds: Set, data: TreeDataItemWithMeta[]): boolean; /** * Get multi-select state: selected, indirect, or unselected */ declare function getMultiSelectState(itemId: string, selectedIds: Set, data: TreeDataItemWithMeta[]): "selected" | "indirect" | "unselected"; /** * Get all node IDs for range selection (from lastSelectedId to currentId) */ declare function getRangeIds(lastSelectedId: string | null, currentId: string, data: TreeDataItemWithMeta[]): string[]; /** * Clean up indirectly selected child nodes, keep only directly selected nodes */ declare function cleanIndirectSelectedNodes(selectedIds: Set, data: TreeDataItemWithMeta[]): Set; /** * Check if adjacent items are selected (directly or indirectly) * Returns whether previous and next items are selected */ declare function getAdjacentSelectionState(itemId: string, selectedIds: Set, data: TreeDataItemWithMeta[]): { hasPrevSelected: boolean; hasNextSelected: boolean; }; /** * Hook for managing tree search functionality */ declare function useTreeSearch({ data, searchQuery, isCaseSensitive, isRegex, }: { data: T[]; searchQuery: string; isCaseSensitive?: boolean; isRegex?: boolean; }): { filteredData: T[]; searchResultsCount: number; isRegexValid: boolean; renderLabel: (label: string, itemId: string) => string | react_jsx_runtime.JSX.Element; hasActiveSearch: boolean; }; /** * Hook for managing tree expand/collapse state and visibility */ declare function useTreeState({ data, defaultExpanded, expandedItems: externalExpandedItems, onToggleItem: externalOnToggleItem, }: { data: T[]; defaultExpanded?: boolean; expandedItems?: Set; onToggleItem?: (id: string) => void; }): { visibleData: TreeDataItemWithMeta[]; expandedItems: Set; toggleItem: (id: string) => void; expandAll: () => void; collapseAll: () => void; hasDescendants: (itemId: string) => boolean; dataWithMeta: TreeDataItemWithMeta[]; }; export { cleanIndirectSelectedNodes, getAdjacentSelectionState, getAncestorIds, getDescendantIds, getMultiSelectState, getRangeIds, isIndirectlySelected, useTreeSearch, useTreeState };