import { TData, PaginatedResponse, PaginatedRequest, DataTableTransformer } from "../types";
import { PaginationState, OnChangeFn } from "@tanstack/react-table";
import { UseQueryResult } from "@tanstack/react-query";
export interface UseDataTableProps<T extends TData> {
    /**
     * The query function to call inside the paginated useQuery function
     * @param page The page number to query
     * @returns The paginated query data
     */
    queryFn: (props: PaginatedRequest) => Promise<PaginatedResponse<T>>;
    /**
     * The query key to use inside the paginated useQuery function
     */
    queryKey: string;
    /**
     * An optional transform function to apply to the data used in the table
     */
    transformer?: DataTableTransformer<T>;
}
export interface UseDataTableReturn<T extends TData> {
    /**
     * The paginated data including the currently selected page index and page size
     */
    pagination: PaginationState;
    /**
     * The pagination change handler to update the page index and page size
     */
    onPaginationChange: OnChangeFn<PaginationState>;
    /**
     * The query response from the useQuery hook, including pagination handlers
     */
    queryResponse: UseQueryResult<PaginatedResponse<T>>;
    /**
     * An optional transform function to apply to the data used in the table
     */
    transformer?: DataTableTransformer<T>;
}
export declare const useDataTable: <T extends object>({ queryFn, queryKey, transformer, }: UseDataTableProps<T>) => UseDataTableReturn<T>;
//# sourceMappingURL=use-data-table.d.ts.map