import debounce from 'debounce';
export declare function useTableItems<T extends object>(items: T[], keyFn: (item: T) => string | number, defaults?: {
    search?: string | null;
}): {
    allSelected: boolean;
    filtered: T[];
    isSelected: (item: T) => boolean;
    page: number;
    paged: T[];
    perPage: number;
    search: string;
    searched: T[];
    selectAll: () => void;
    selectItem: (item: T) => void;
    selectPage: () => void;
    selectedItems: T[];
    setFilterFn: (filterFn: ((item: T) => boolean) | undefined) => void;
    setPage: import("react").Dispatch<import("react").SetStateAction<number>>;
    setPerPage: import("react").Dispatch<import("react").SetStateAction<number>>;
    setSearch: debounce.DebouncedFunction<(search: string) => void>;
    setSearchFn: (searchFn: (item: T, search: string) => number) => void;
    setSort: import("react").Dispatch<import("react").SetStateAction<ISort<T> | undefined>>;
    sort: ISort<T> | undefined;
    sorted: T[];
    unselectAll: () => void;
    unselectItem: (item: T) => void;
};
export interface ISelected<T extends object> {
    selectedItems: T[];
    selectItem: (item: T) => void;
    selectItems: (items: T[]) => void;
    unselectItem: (item: T) => void;
    unselectItems: (items: T[]) => void;
    isSelected: (item: T) => boolean;
    selectAll: () => void;
    unselectAll: () => void;
    allSelected: boolean;
    keyFn: (item: T) => string | number;
}
export declare function useSelected<T extends object>(items: T[], keyFn: (item: T) => string | number, defaultSelection?: T[]): ISelected<T>;
export declare function useSelectedInMemory<T extends object>(items: T[] | undefined, keyFn: (item: T) => string | number): {
    selectedItems: T[];
    selectItem: (item: T) => void;
    unselectItem: (item: T) => void;
    isSelected: (item: T) => boolean;
    selectItems: (items: T[]) => void;
    selectAll: () => void;
    unselectAll: () => void;
    allSelected: boolean;
    keyFn: (item: T) => string | number;
    unselectItems: (items: T[]) => void;
};
export interface ISort<T extends object> {
    id: string;
    sortFn: (l: T, r: T) => number;
    direction: 'asc' | 'desc';
}
export declare function useSorted<T extends object>(items: T[] | undefined): {
    sorted: T[];
    sort: ISort<T> | undefined;
    setSort: import("react").Dispatch<import("react").SetStateAction<ISort<T> | undefined>>;
};
export declare function useFiltered<T extends object>(items: T[], keyFn: (item: T) => string | number): {
    filtered: T[];
    setFilterFn: (filterFn: ((item: T) => boolean) | undefined) => void;
};
export declare function usePaged<T extends object>(source: T[]): {
    paged: T[];
    page: number;
    setPage: import("react").Dispatch<import("react").SetStateAction<number>>;
    perPage: number;
    setPerPage: import("react").Dispatch<import("react").SetStateAction<number>>;
};
