import type { ResolveLinkResult } from '../../types/doc-source'; /** * `useDocsResolveLink(sourceId, override?)` — POST `/api/docs/resolve-link` * (or the override / `ChatRuntime.endpoints.docsResolveLinkUrl`) for a * relative href inside a doc body, returning a `ResolveLinkResult` * envelope. * * The endpoint chain (`override ?? runtime.endpoints.docsResolveLinkUrl * ?? '/api/docs/resolve-link'`) mirrors `searchEndpoint` resolution in * `` so embedders configure both the same way: per-instance * prop OR ambient `ChatRuntimeProvider`. * * The full fetch + JSON-parse pipeline is wrapped in try/catch so a * network throw (DNS / CORS / offline) or a non-JSON response surfaces * as `{ success: false, error }` — the markdown renderer's broken-link * badge handles that branch instead of swallowing an unhandled rejection * past the click handler. */ export declare function useDocsResolveLink(sourceId: string, resolveLinkEndpoint?: string | null): (href: string, currentPath: string) => Promise; //# sourceMappingURL=use-docs-resolve-link.d.ts.map