import type { CategorySearchHit } from "../catalog/search.js"; import type { UseCategoryCatalogOptions } from "../model/queries.js"; export interface UseCategorySearchOptions extends UseCategoryCatalogOptions { /** * Resolve a translation key to a caption, so the match runs against what the * person can READ. Category names arrive as translation keys * (`catalog/labels.ts`); without this, "phones" matches nothing on a * catalogue whose rows say `category.phones`, and the honest fallback is to * match the key. */ readonly translate?: (key: string) => string; /** Path prefix for a hit's link. Default `/c`. */ readonly basePath?: string; /** Cap on the number of hits. Default `CATEGORY_SEARCH_LIMIT`. */ readonly limit?: number; } /** * Categories matching `query`, ranked and capped. * * Returns an ARRAY, not a `LoadState`, and that is deliberate: this is a * secondary hint above somebody else's results, and "the catalogue is still * syncing" has the same correct rendering as "nothing matched" — nothing. * A skin that wanted to say more would be adding a second load story to a * screen that already has one. * * ```tsx * const hits = useCategorySearch(q, { translate: useT() }); * * ``` */ export declare function useCategorySearch(query: string, options?: UseCategorySearchOptions): readonly CategorySearchHit[]; //# sourceMappingURL=useCategorySearch.d.ts.map