import * as react_jsx_runtime from 'react/jsx-runtime';
import { ReactElement, FC } from 'react';
import { ColumnDef, RowSelectionState, OnChangeFn, Row, PaginationState, SortingState } from '@tanstack/react-table';
import { ButtonProps } from '../Button/Button.js';

type DataTableProps<T> = {
    variant?: 'simple' | 'default';
    columns: ColumnDef<T>[];
    data: T[];
    size?: 'sm' | 'md';
    showColumnSelector?: boolean;
    enableColumnFilters?: boolean;
    enableColumnResizing?: boolean;
    expandRowByClick?: boolean;
    rowSelection?: RowSelectionState;
    onRowSelectionChange?: OnChangeFn<RowSelectionState>;
    defaultPageSize?: 5 | 10 | 20 | 30 | 40 | 50 | 100;
    selectable?: boolean;
    emptyText?: string;
    emptyAction?: ReactElement<ButtonProps>;
    isLoading?: boolean;
    loadingText?: string;
    rowClassName?: (row: Row<T>) => string;
} & ({
    onRow?: (row: Row<T>) => void;
    subComponent?: never;
    getRowCanExpand?: never;
} | {
    onRow?: never;
    subComponent?: FC<{
        row: Row<T>;
    }>;
    getRowCanExpand?: (row: Row<T>) => boolean;
}) & ({
    pagination?: false;
    onPaginationChange?: never;
} | {
    pagination: true | PaginationState;
    onPaginationChange?: OnChangeFn<PaginationState>;
}) & ({
    sorting?: false;
    onSortingChange?: never;
} | {
    sorting: true | SortingState;
    onSortingChange?: OnChangeFn<SortingState>;
});
declare function DataTable<T>({ variant, columns, data, size, showColumnSelector, enableColumnFilters, enableColumnResizing, subComponent: SubComponent, expandRowByClick, selectable, rowSelection, onRowSelectionChange, defaultPageSize, sorting, onSortingChange, pagination, onPaginationChange, emptyText, emptyAction, isLoading, loadingText, onRow, rowClassName, getRowCanExpand, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;

export { DataTableProps, DataTable as default };
