import { UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
import { Source } from '../providers/sources/types';
import { Stats, StatsResponse } from './types';
/**
 * Requests statistics for a specific property of a data source, returning aggregate metrics for numeric attributes or category distributions for string attributes.
 *
 * @returns A React Query result containing `data` (typed as `StringStatsResponse` or `NumberStatsResponse`), `error`, and `isLoading`.
 *
 * @remarks
 * The hook is generic: use `useStats<number>` for numeric attributes (returns avg, sum, min, max, quantiles) or `useStats<string>` for string attributes (returns category frequencies).
 * Supports CARTO query/table/tileset sources and client-side GeoJSON sources.
 *
 * @example
 * ```tsx
 * const { data, error, isLoading } = useStats<number>({
 *   source: mySource,
 *   attribute: 'population',
 *   accessToken: 'YOUR_ACCESS_TOKEN',
 * })
 * ```
 */
export declare function useStats<Attribute extends string | number>({ source, attribute, accessToken, params, fetcherOptions, useQueryProps: { enabled, ...useQueryProps }, }: {
    source: Source | undefined;
    attribute: Stats['attribute'];
    accessToken: Stats['accessToken'];
    params?: Stats['params'];
    fetcherOptions?: Stats['fetcherOptions'];
    useQueryProps?: Omit<UseQueryOptions<StatsResponse<Attribute>, Error>, 'queryKey' | 'queryFn'>;
}): UseQueryResult<StatsResponse<Attribute>, Error>;
