import { CategoryResponse } from '@carto/api-client';
import { ModelQueryFactory } from './utils/create-model';
import { CategoryWidgetProps, ModelComponentProps, ModelHookResponse, ModelProps } from './types';
/**
 * Imperative query options factory for the Categories widget. Returns a
 * React Query options object usable with `queryClient.prefetchQuery`,
 * `fetchQuery`, `ensureQueryData`, etc. Also powers `useCategories` /
 * `CategoriesModel` so the imperative path and the hook share one source of
 * truth for query-key + query-fn construction.
 */
export declare const getCategories: ModelQueryFactory<CategoryWidgetProps, CategoryResponse>;
/**
 * `useCategories` is a hook that groups records by a categorical column and optionally aggregates each group.
 * `CategoriesModel` is the render-props component equivalent.
 *
 * @example
 * ```tsx
 * <CategoriesModel
 *   accessToken={token}
 *   sourceId="my_source"
 *   widgetProps={{ column: 'category', operation: 'count' }}
 * >
 *   {({ data }) => <CategoryChart data={data} />}
 * </CategoriesModel>
 * ```
 */
declare function useCategories<P extends ModelProps<CategoryWidgetProps, CategoryResponse>>(props: P): ModelHookResponse<P, CategoryResponse>;
declare function CategoriesModel<P extends ModelProps<CategoryWidgetProps, CategoryResponse>>(props: ModelComponentProps<CategoryWidgetProps, CategoryResponse, P>): React.ReactElement;
export { useCategories, CategoriesModel };
