import { ReactElement } from 'react';
import { Property } from 'csstype';
import { ButtonProps } from './button';
export type TableCellType = 'auto' | 'unknown' | 'undefined' | 'null' | 'text' | 'number' | 'date' | 'relative-date' | 'datetime' | 'relative-datetime' | 'time' | 'relative-time' | 'boolean';
export interface TableItem {
    id: string;
}
export interface TableCellComponentProps<I extends TableItem = TableItem> {
    column: TableColumn<I>;
    item: I;
}
export type TableColumnSort = 'asc' | 'desc';
export interface TableColumn<I extends TableItem = TableItem> {
    key: keyof I | string;
    label?: string;
    align?: Property.TextAlign;
    type?: TableCellType;
    width?: string | number;
    sortable?: boolean;
    sorted?: TableColumnSort;
    onSort?: (sorted?: TableColumnSort) => unknown;
    cellElement?: ReactElement<TableCellComponentProps<I>> | null;
    cellComponent?: (props: TableCellComponentProps<I>) => ReactElement | null;
    hidden?: boolean;
}
export type TableSelection = string | string[] | undefined;
export interface TableItemAction extends ButtonProps {
    key: string;
    onlySingle?: boolean;
}
export interface TableProps<I extends TableItem = TableItem> {
    columns: TableColumn<I>[];
    items?: I[];
    EmptyPlaceholder?: ReactElement;
    emptyLabel?: string;
    onClickItem?: (item: I) => unknown;
    onSelectItem?: (selection: TableSelection) => unknown;
    selectionMode?: 'single' | 'multiple';
    defaultSelection?: TableSelection;
    itemActions?: TableItemAction[];
}
export declare function Table<I extends TableItem = TableItem>({ columns, items, EmptyPlaceholder, emptyLabel, onClickItem, onSelectItem, selectionMode, defaultSelection, itemActions, }: TableProps<I>): ReactElement;
