import { UseQueryResult } from "@tanstack/react-query";
import { PaginationState, OnChangeFn } from "@tanstack/react-table";
import { DataTableTransformer, PaginatedResponse, TData } from "../types";
export type ArrayElement<ArrayType extends readonly unknown[]> = ArrayType extends readonly (infer ElementType)[] ? ElementType : never;
export interface DataTableProps<T extends TData> {
    /**
     * Th title of the table
     */
    title: string;
    /**
     * The fields to display in the table
     */
    headerFields: (keyof T | "_")[];
    /**
     * The query response from the useDataTable hook
     */
    queryResponse: UseQueryResult<PaginatedResponse<T>>;
    /**
     * The pagination state from the useDataTable hook
     */
    pagination: PaginationState;
    /**
     * The pagination change handler from the useDataTable hook
     */
    onPaginationChange: OnChangeFn<PaginationState>;
    /**
     * An optional transform function to apply to the data used in the table
     */
    transformer?: DataTableTransformer<T>;
}
/**
 * A data table component that for formatted, paginated data
 *
 * @example
 * ```tsx
 * // Example usage
 * const dataTableProps = useDataTable<DataType>({
 *   queryFn: getPaginatedTestData,
 *   queryKey: "example-key",
 * })
 *
 * return <DataTable<DataType> {...dataTableProps} />
 * ```
 *
 * @param params The props for the data table
 * @returns A formatted data table
 */
export declare const DataTable: <T extends object>({ title, headerFields, queryResponse, pagination, onPaginationChange, transformer, }: DataTableProps<T>) => import("react/jsx-runtime").JSX.Element;
//# sourceMappingURL=DataTable.d.ts.map