import { ReactElement } from 'react'; import { Model } from '@fridaygame/client'; import { ButtonProps } from './button'; export type TableCellType = 'auto' | 'unknown' | 'text' | 'number' | 'date' | 'relative-date' | 'datetime' | 'relative-datetime' | 'time' | 'relative-time' | 'boolean'; export interface TableCellProps { value: unknown; type?: TableCellType; } export interface TableColumn { key: string; label?: string; type?: TableCellType; width?: string | number; sorted?: 'asc' | 'desc'; onSort?: () => unknown; Cell?: (props: { item: M; }) => ReactElement; } export type TableSelection = string | string[] | undefined; export interface TableItemAction extends ButtonProps { key: string; onlySingle?: boolean; } export interface TableProps { columns: TableColumn[]; data?: M[]; EmptyPlaceholder?: ReactElement; emptyLabel?: string; onSelectItem?: (selection: TableSelection) => unknown; selectionMode?: 'single' | 'multiple'; defaultSelection?: TableSelection; itemActions?: TableItemAction[]; } export declare function Table({ columns, data, EmptyPlaceholder, emptyLabel, onSelectItem, selectionMode, defaultSelection, itemActions, }: TableProps): ReactElement;