import { TNode, ClassName } from '../common';
import { LoadingProps } from '../loading';
export interface TdBaseTableProps<T extends TableRowData = TableRowData> {
    bordered?: boolean;
    cellEmptyContent?: string | TNode<BaseTableCellParams<T>>;
    columns?: Array<BaseTableCol<T>>;
    data?: Array<T>;
    empty?: string | TNode;
    fixedRows?: Array<number>;
    height?: string | number;
    loading?: boolean | TNode;
    loadingProps?: Partial<LoadingProps>;
    maxHeight?: string | number;
    rowKey: string;
    showHeader?: boolean;
    stripe?: boolean;
    tableContentWidth?: string;
    tableLayout?: 'auto' | 'fixed';
    verticalAlign?: 'top' | 'middle' | 'bottom';
    onCellClick?: (context: BaseTableCellEventContext<T>) => void;
    onRowClick?: (context: RowEventContext<T>) => void;
    onScroll?: (params: {
        e: Event;
    }) => void;
}
export interface BaseTableInstanceFunctions<T extends TableRowData = TableRowData> {
    refreshTable: () => void;
}
export interface BaseTableCol<T extends TableRowData = TableRowData> {
    align?: 'left' | 'right' | 'center';
    cell?: string | TNode<BaseTableCellParams<T>>;
    colKey?: string;
    ellipsis?: boolean | TNode<BaseTableCellParams<T>>;
    ellipsisTitle?: boolean | TNode<BaseTableColParams<T>>;
    fixed?: 'left' | 'right';
    minWidth?: string | number;
    title?: string | TNode<{
        col: BaseTableCol;
        colIndex: number;
    }>;
    width?: string | number;
}
export interface BaseTableCellEventContext<T> {
    row: T;
    col: BaseTableCol;
    rowIndex: number;
    colIndex: number;
    e: MouseEvent;
}
export interface RowEventContext<T> {
    row: T;
    index: number;
    e: MouseEvent;
}
export interface TableRowData {
    [key: string]: any;
    children?: TableRowData[];
}
export interface BaseTableCellParams<T> {
    row: T;
    rowIndex: number;
    col: BaseTableCol<T>;
    colIndex: number;
}
export interface BaseTableColParams<T> {
    col: BaseTableCol<T>;
    colIndex: number;
}
export interface RowClassNameParams<T> {
    row: T;
    rowIndex: number;
    type?: 'body' | 'foot';
}
export declare type TableColumnClassName<T> = ClassName | ((context: CellData<T>) => ClassName);
export interface CellData<T> extends BaseTableCellParams<T> {
    type: 'th' | 'td';
}
export interface BaseTableCellParams<T> {
    row: T;
    rowIndex: number;
    col: BaseTableCol<T>;
    colIndex: number;
}
export declare type DataType = TableRowData;
