import type { FilterOption } from './dynamic-columns-shim'; export interface UseFacetLoadersResult { /** * Stable per-field loader → `?field=&q=&limit=`. Cached per * `field+query`. Null `facetsBase` → yields `undefined` (column stays text). */ getFacetLoader: (field: string) => ((q?: string) => Promise) | undefined; /** * Warms the caches for a set of facet fields in ONE parallel burst (called * when metadata resolves), so a popover opens instantly with values + counts * instead of showing "Cargando…". Deduped by the field set; a field whose * request fails is simply omitted (it degrades to lazy/text — the rest are * unaffected). Resolved options also land in `facetOptions`. */ prefetchFacets: (fields: string[]) => void; /** Prefetched options per field (empty until `prefetchFacets` resolves). */ facetOptions: Map; } /** * Long-text / body columns aren't worth faceting (thousands of unique values, * each a paragraph). Heuristic on the metadata, not a hardcoded name list: * a truncate-text/widget cell or a json/long-text SQL type are the strong * signals; the name pattern is only a last-resort fallback. */ export declare function isLongTextColumn(c: { key: string; type?: string; cellStyle?: string; }): boolean; /** * Facet option machinery: a stable per-field lazy loader (`getFacetLoader`, with * a `field+query` result cache) plus `prefetchFacets` to warm every facet * field's values up front and `facetOptions` holding those prewarmed results. * Loader identity is memoized per field (so it doesn't churn the config memo * that depends on it). Caches reset when `facetsBase` changes (model switch). */ export declare function useFacetLoaders(facetsBase: string | null): UseFacetLoadersResult; //# sourceMappingURL=use-facet-loaders.d.ts.map