import { ChangeValueOptions, Filter, FilterEvents, FilterStateBaseParams } from '../../model';
export interface RangeItem<T> {
    from: T | null;
    to: T | null;
    preset?: string;
}
export interface RangeFilterStateParams<T> extends FilterStateBaseParams<RangeItem<T>> {
    /**
     * Convert an unknown object to a T.
     * @param value
     * @external
     */
    readonly parse: (value: unknown) => T | null;
    /**
     * Return a simplified form of an item for serialization.
     * @param value
     * @external
     */
    readonly simplify?: (value: T) => Partial<T>;
    /**
     * Indicates whether an item matches the current value of the filter
     * @external
     */
    readonly matches?: (item: RangeItem<T>, value: RangeItem<T>) => boolean;
    /**
     * Indicates whether a preset does not exist or is empty
     * @external
     */
    readonly isEmptyPreset?: (preset?: string) => boolean;
    /**
     * Converts a preset string to a RangeItem
     * @param preset
     * @external
     */
    readonly parsePreset?: (preset?: string) => RangeItem<T>;
}
export declare class RangeFilterState<T> implements Filter<RangeItem<T>> {
    name: string;
    persistent: boolean | undefined;
    readonly itemKey: (item: RangeItem<T>) => string;
    readonly itemName: (item: RangeItem<T>) => string;
    readonly equals?: (item1: RangeItem<T>, item2: RangeItem<T>) => boolean;
    readonly isCustomField?: boolean;
    readonly isEmptyPreset: (preset?: string) => boolean;
    readonly parsePreset: (preset?: string) => RangeItem<T>;
    readonly parse: RangeFilterStateParams<T>['parse'];
    readonly simplify: (value: T) => Partial<T>;
    readonly matches: (item: RangeItem<T>, value: RangeItem<T>) => boolean;
    _value: RangeItem<T>;
    readonly events: FilterEvents;
    constructor(params: RangeFilterStateParams<T>);
    get emptyValue(): {
        from: null;
        to: null;
    };
    get value(): RangeItem<T>;
    _toArray: (value: RangeItem<T>) => RangeItem<T>[];
    get toArray(): RangeItem<T>[];
    get isEmpty(): boolean;
    get size(): 0 | 1;
    get toQueryString(): string;
    encode(value: RangeItem<T>): {
        preset: string | undefined;
    } | {
        to?: Partial<T> | undefined;
        from?: Partial<T> | undefined;
        preset?: undefined;
    };
    decode(raw: unknown): RangeItem<T>;
    setValue(value: RangeItem<T>, { emitEvents, ...options }?: ChangeValueOptions): void;
    changeValue(value: RangeItem<T>, { emitEvents, ...options }?: ChangeValueOptions): void;
    remove(items: RangeItem<T>[], options?: ChangeValueOptions): void;
    applyFromQueryString(str: string): void;
    refresh(value: RangeItem<T>, options?: ChangeValueOptions): void;
    scheduleRefresh(value: RangeItem<T>): void;
    reset(options?: ChangeValueOptions): void;
    hasDiff(rangeItem: RangeItem<T>): boolean;
    clone(params: Partial<RangeFilterStateParams<T>>): RangeFilterState<T>;
}
export declare const rangeFilter: <T>(params: RangeFilterStateParams<T>) => RangeFilterState<T>;
export declare const toString: (item: RangeItem<Date>) => string;
export declare const dateRangeFilter: (params?: Partial<RangeFilterStateParams<Date>>) => RangeFilterState<Date>;
export declare const numberRangeFilter: (params?: Partial<RangeFilterStateParams<number>>) => RangeFilterState<number>;
//# sourceMappingURL=RangeFilterState.d.ts.map