import type { GitHubRepo } from "./useGitHubRepos";
/** Return value of {@link useGitHubSearch}. */
export interface UseGitHubSearchReturn {
    /** Search results for the current debounced query. */
    readonly results: readonly GitHubRepo[];
    /** `true` while the search request is in flight. */
    readonly isSearching: boolean;
    /** Error message from the last failed search, or `null` when healthy. */
    readonly error: string | null;
    /** Current raw search query (not debounced). */
    readonly query: string;
    /** Update the search query. The actual API call is debounced internally. */
    readonly setQuery: (query: string) => void;
    /** Total number of repositories matching the query across GitHub. */
    readonly totalCount: number;
    /** Whether more result pages are available. */
    readonly hasMore: boolean;
    /** Fetch the next page of results. */
    readonly loadMore: () => void;
}
/**
 * Data hook that searches GitHub's public repository index.
 *
 * Uses the GitHub Search API (`/search/repositories`) with debounced input.
 * Finds repositories across all of GitHub, not just the user's own repos.
 * Works with or without an auth token (auth: 30 req/min; unauth: 10 req/min).
 *
 * @example
 * ```tsx
 * function GitHubSearch({ token }: { token: string | null }) {
 *   const { results, isSearching, query, setQuery, hasMore, loadMore } =
 *     useGitHubSearch(token);
 *
 *   return (
 *     <div>
 *       <input
 *         value={query}
 *         onChange={(e) => setQuery(e.target.value)}
 *         placeholder="Search all of GitHub…"
 *       />
 *       {isSearching && <Spinner />}
 *       <ul>
 *         {results.map((repo) => (
 *           <li key={repo.id}>{repo.fullName}</li>
 *         ))}
 *       </ul>
 *       {hasMore && <button onClick={loadMore}>Load more</button>}
 *     </div>
 *   );
 * }
 * ```
 */
export declare function useGitHubSearch(token: string | null): UseGitHubSearchReturn;
//# sourceMappingURL=useGitHubSearch.d.ts.map