import { AllFilters, ChangeValueOptions, ComputedQueryFull, Filter, FiltersMap } from '../model';
import { Pagination } from './Pagination';
import { History } from 'history';
import { SortState } from './SortState';
import { TypedEmitter } from '../util';
import { QueryHistoryState } from './QueryHistoryState';
export interface QueryStateParams<F extends FiltersMap = FiltersMap> {
    history?: History;
    filters: F;
    search?: Filter<string>;
    limit?: number;
    refreshOnColumnsChange?: boolean;
    extra?: string;
}
export type QueryStateEvents = {
    change: () => void;
    refresh: (opts?: {
        clearResult?: boolean;
    }) => void;
    scheduleRefresh: (opts?: {
        clearResult?: boolean;
    }) => void;
    persist: () => void;
};
export declare class QueryState<F extends FiltersMap = FiltersMap> {
    readonly history?: History;
    readonly pagination: Pagination;
    customFilters: F;
    sort: SortState;
    _filters: AllFilters<F>;
    readonly events: TypedEmitter<QueryStateEvents>;
    readonly queryHistory: QueryHistoryState<F> | null;
    readonly refreshOnColumnsChange: boolean | undefined;
    _columns: import("mobx").ObservableSet<string>;
    _fields: import("mobx").ObservableSet<string>;
    _initializedFromHistory?: boolean;
    _skipFilterListeners?: boolean;
    _extra?: string;
    constructor(params: QueryStateParams<F>);
    init({ skipFilterListeners }?: {
        skipFilterListeners?: boolean;
    }): () => void;
    get limit(): number;
    get fields(): string[];
    get fieldsKey(): string[];
    get fieldsKeyHash(): string;
    get filtersKey(): { [P in keyof F]: string[] | null | undefined; };
    get filtersKeyHash(): string;
    changeLimit(limit: number): void;
    reset(): void;
    private _toComputed;
    toComputed(): ComputedQueryFull<F>;
    get asComputed(): ComputedQueryFull<F>;
    get filtersArray(): Filter<unknown>[];
    get nonPersistentFilters(): Filter<unknown>[];
    get filtersEntries(): [string, Filter<unknown>][];
    get nonPersistentFiltersEntries(): [string, Filter<unknown>][];
    get nonPersistentCustomFiltersCount(): number;
    get hasNonPersistentCustomFilters(): boolean;
    get nonPersistentCustomFilters(): Filter<unknown>[];
    get nonPersistentFiltersMap(): Partial<F>;
    get activeFiltersEntries(): [string, Filter<unknown>][];
    get activeFilters(): Filter<unknown>[];
    get activeFiltersCount(): number;
    get hasActiveFilters(): boolean;
    get hasNonPersistentActiveFilters(): boolean;
    get hasActiveSort(): boolean;
    addFilterIfNeeded<K extends keyof AllFilters<F>>(key: K, filter: AllFilters<F>[K]): (() => void) | undefined;
    resetFilters(options?: ChangeValueOptions): void;
    resetCustomFilters(options?: ChangeValueOptions): void;
    resetSorting(params?: {
        emitChangeEvent?: boolean;
    }): void;
    resetPage(): void;
    get search(): Filter<string>;
    get filters(): AllFilters<F>;
    get extra(): string | undefined;
    setExtra(extra: string | undefined): void;
    addFilterListeners: (filter: Filter<unknown>) => (() => void)[];
}
//# sourceMappingURL=QueryState.d.ts.map