import { FormulaResponse } from '@carto/api-client';
import { ModelQueryFactory } from './utils/create-model';
import { FormulaWidgetProps, ModelComponentProps, ModelHookResponse, ModelProps } from './types';
export declare const getFormula: ModelQueryFactory<FormulaWidgetProps, FormulaResponse>;
/**
 * `useFormula` is a hook that performs an aggregation operation (count, sum, avg, min, max) on a single column.
 * `FormulaModel` is the render-props component equivalent.
 *
 * @example
 * ```tsx
 * <FormulaModel
 *   accessToken={token}
 *   sourceId="my_source"
 *   widgetProps={{ column: 'population', operation: 'sum' }}
 * >
 *   {({ data, isLoading }) => <span>{data?.value}</span>}
 * </FormulaModel>
 * ```
 */
declare function useFormula<P extends ModelProps<FormulaWidgetProps, FormulaResponse>>(props: P): ModelHookResponse<P, FormulaResponse>;
declare function FormulaModel<P extends ModelProps<FormulaWidgetProps, FormulaResponse>>(props: ModelComponentProps<FormulaWidgetProps, FormulaResponse, P>): React.ReactElement;
export { useFormula, FormulaModel };
