import { Dispatch, SetStateAction } from 'react';
import { IFilterState } from './PageToolbar/PageToolbarFilter';
import { ITableColumn, IToolbarFilter } from '../framework';
export interface IView {
    page: number;
    setPage: (page: number) => void;
    perPage: number;
    setPerPage: (perPage: number) => void;
    sort: string;
    setSort: (sort: string) => void;
    sortDirection: 'asc' | 'desc';
    setSortDirection: (sortDirection: 'asc' | 'desc') => void;
    filterState: IFilterState;
    setFilterState: Dispatch<SetStateAction<IFilterState>>;
    clearAllFilters: () => void;
}
export interface ViewOptions {
    defaultValues?: Partial<Pick<IView, 'filterState' | 'sort' | 'sortDirection'>> | undefined;
    disableQueryString?: boolean;
    ignoreQueryStringKeys?: string[];
    filterQueryStringKeys?: string[];
}
export type QueryParams = {
    [key: string]: string | string[];
};
export interface ViewExtendedOptions<T extends object> extends ViewOptions {
    url: string;
    keyFn: (item: T) => string | number;
    toolbarFilters?: IToolbarFilter[];
    tableColumns?: ITableColumn<T>[];
    disableQueryString?: boolean;
    queryParams?: QueryParams;
    sortKey?: string;
    defaultFilters?: Record<string, string[]>;
}
export declare function useView(options: ViewOptions): IView;
