import React from "react";
import { type HistogramBucket } from "./createHistogramBuckets.js";
export interface RangeInputConfig<T> {
	inputType: "number" | "date";
	formatValue: (value: T | undefined) => string;
	parseValue: (value: string) => T | undefined;
	toNumber: (value: T) => number;
	fromNumber: (value: number) => T;
	minLabel: string;
	maxLabel: string;
	formatTooltip: (min: T, max: T, count: number) => string;
	formatPlaceholder?: (value: T) => string;
	inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
	/**
	* For `inputType === "date"`: forwarded to each `DatePicker` (From/To)
	* so the histogram From/To inputs render the consumer-provided display
	* string instead of ISO. Ignored for number ranges.
	*/
	formatDate?: (date: Date) => string;
}
export interface RangeInputProps<T> {
	valueCountPairs: Array<{
		value: T
		count: number
	}>;
	isLoading: boolean;
	minValue: T | undefined;
	maxValue: T | undefined;
	onChange: (min: T | undefined, max: T | undefined) => void;
	showHistogram?: boolean;
	className?: string;
	style?: React.CSSProperties;
	config: RangeInputConfig<T>;
	/**
	* Optional pre-computed histogram. If provided, `RangeInput` skips its
	* built-in bucketer and uses these buckets verbatim. Use this when the
	* caller has domain knowledge that improves on uniform numeric bucketing
	* — e.g. `createDateHistogramBuckets` snaps to calendar boundaries and
	* supplies per-bucket tick labels.
	*/
	histogramData?: {
		buckets: Array<HistogramBucket<T>>
		subtitle?: string
	};
	/**
	* When true, clicking a histogram bar replaces the filter range with
	* that bucket's `[min, max]`. Default `false` (no behavior change).
	*/
	clickToFilter?: boolean;
}
declare function RangeInputInner<T>({ valueCountPairs, isLoading, minValue, maxValue, onChange, showHistogram, className, style, config, histogramData, clickToFilter }: RangeInputProps<T>): React.ReactElement;
export declare const RangeInput: typeof RangeInputInner;
export {};
