import React from "react";
import { type PaginationControlsProps } from "@metabase/embedding-sdk-react/dist/frontend/src/metabase/components/PaginationControls";
import { SortDirection } from "@metabase/embedding-sdk-react/dist/frontend/src/metabase-types/api/sorting";
import type { ColumnItem } from "./types";
export type BaseRow = Record<string, unknown> & {
    id: number | string;
};
export type TableProps<Row extends BaseRow> = {
    columns: ColumnItem[];
    rows: Row[];
    rowRenderer: (row: Row) => React.ReactNode;
    sortColumnName?: string | null;
    sortDirection?: SortDirection;
    onSort?: (columnName: string, direction: SortDirection) => void;
    paginationProps?: Pick<PaginationControlsProps, "page" | "pageSize" | "total"> & {
        onPageChange: (page: number) => void;
    };
    emptyBody?: React.ReactNode;
    cols?: React.ReactNode;
} & Omit<React.HTMLProps<HTMLTableElement>, "rows" | "cols">;
/**
 * A basic reusable table component
 *
 * @param props.columns         - an array of objects with name and key properties
 * @param props.rows            - an array of objects with keys that match the column keys
 * @param props.rowRenderer     - a function that takes a row object and returns a <tr> element
 * @param props.sortColumnName  - ID of the column currently used in row sorting
 * @param props.sortDirection   - The direction of the sort. Can be "asc" or "desc"
 * @param props.onSort          - a callback containing updated sort info for when a header is clicked
 * @param props.paginationProps - a map of information used to render pagination controls.
 * @param props.emptyBody       - content to be displayed when the row count is 0
 * @param props.cols            - a ReactNode that is inserted in the table element before <thead>. Useful for defining <colgroups> and <cols>
 * @param props.className       - this will be added to the <table> element along with the default classname
 * @note All other props are passed to the <table> element
 */
export declare function Table<Row extends BaseRow>({ columns, rows, rowRenderer, sortColumnName, sortDirection, onSort, paginationProps, emptyBody, cols, className, ...rest }: TableProps<Row>): import("react/jsx-runtime").JSX.Element;
