import type { DocNode, DocContent } from '../../types/doc-source'; export interface UseDocumentTreeConfig { /** API endpoint for fetching the document tree structure */ structureEndpoint: string; /** API endpoint for fetching document content */ contentEndpoint: string; /** Base route path for URL navigation (e.g., '/knowledge-base', '/data-room') */ baseRoute: string; /** Folder-index filename (defaults to 'README.md'). */ folderIndexFile?: string; } /** * Generic hook for document tree navigation and content fetching. * Drives DocViewer across all doc-source consumers. * * Client-only: structure + content fetches run in parallel on first mount. * No SSR pre-population — the previous SSR path required a Supabase admin * client (service role key) and silently fell back to client fetches on * envs where the key wasn't set; the parallel client fetches keep behavior * uniform across local + prod (latency ~= max(structure, content), not sum). */ export declare function useDocumentTree(config: UseDocumentTreeConfig, initialPath?: string): { structure: DocNode[]; selectedPath: string; setSelectedPath: import("react").Dispatch>; content: DocContent | null; isLoadingStructure: boolean; isLoadingContent: boolean; error: string | null; expandedNodes: Set; toggleNode: (nodeId: string) => void; selectNode: (node: Pick) => void; navigateToDoc: (path: string, options?: { expandFolder?: boolean; fromInternalLink?: boolean; }) => void; refetch: () => Promise; setExpandedNodes: import("react").Dispatch>>; }; export type { DocNode, DocContent }; //# sourceMappingURL=use-document-tree.d.ts.map