import type { SearchResult } from '../../ui/search-input'; import type { ComposeContentUrl } from '../../../utils/content-href'; export interface UseDocSearchConfig { /** Discriminator passed to `/api/docs/search?source=` (e.g. * `'openframe'`). Embedders set it to whatever discriminator their * reverse-proxy expects. */ source: string; /** Base route prefix this search lives under (e.g. `'/onboarding-guides'`). * When a result's href starts with `${baseRoute}/`, the hook * attempts the optional in-page swap path before falling through * to a full nav. */ baseRoute: string; /** Imperative navigation fallback. Called when no override * (in-page swap, new-tab) applies. Hub callers pass * `(path) => router.push(path)`; embedders pass an equivalent. */ onNavigate: (path: string) => void; /** Optional `RagTableConfig.id` list to narrow the search to specific * tables (e.g. `['onboarding-guides']`). Forwarded to * `/api/docs/search?tableIds=…` which intersects with the source's * standing set. */ tableIds?: string[]; /** Optional in-page swap callback. When the result's href is under * `baseRoute` AND this callback returns true, the hook treats the * click as handled in-page (no router push). Hub's * `` wires this to * `useDocNavigation().navigate(path)`. */ onInPageSwap?: (path: string) => boolean; /** Optional endpoint override. Defaults to `'/api/docs/search'` * (the hub's reverse-proxy route). Embedders with a different * path can override. */ searchEndpoint?: string; /** Optional content-href seam override. Same fall-back chain as * `searchEndpoint`: prop → `runtime.composeContentUrl` → none. Wired, * it makes a result row honor the host's `hostedTypes` / `overrides` * instead of navigating to the RAG's canonical hub URL — so a row * lands where the catalog card for the same entity lands. */ composeContentUrl?: ComposeContentUrl; } export declare function useDocSearch(config: UseDocSearchConfig): { query: string; setQuery: import("react").Dispatch>; results: SearchResult[]; isLoading: boolean; handleResultSelect: (result: SearchResult, modifiers?: { metaKey?: boolean; ctrlKey?: boolean; shiftKey?: boolean; altKey?: boolean; button?: number; }) => void; keepDropdownOpen: boolean; }; //# sourceMappingURL=use-doc-search.d.ts.map