import { CSSProperties, ReactNode } from 'react';
import { ThemeUIStyleObject } from 'theme-ui';
export declare type KeyOf<TRow extends object> = Exclude<keyof TRow, symbol>;
export interface TableCellProps {
    children: ReactNode;
    tooltip?: ReactNode;
    style?: CSSProperties;
    className?: string;
    sx?: ThemeUIStyleObject;
}
export declare type SortDirection = 'asc' | 'desc';
export interface SortDescriptor<TColumnKey extends string | number = string | number> {
    column?: TColumnKey;
    direction?: SortDirection;
}
export interface ColumnInfo<TRow extends object, TColumnKey = KeyOf<TRow>> {
    /** Whether the column allows sorting. */
    allowsSorting?: boolean;
    pinningDisabled?: boolean;
    key: TColumnKey;
    label: ReactNode;
    /**
     * Given a `string`, tooltip `title` will be set to `column.label`.
     */
    tooltip?: string | {
        title?: string;
        text: ReactNode;
    };
    cellProps?: (row: TRow, columnKey: TColumnKey) => TableCellProps;
    width?: string | number;
}
export interface ColumnGroup<TRow extends object, TColumnKey = KeyOf<TRow>> {
    label: string;
    columns: ColumnInfo<TRow, TColumnKey>[];
}
export interface TableRowProps<T> {
    children: ReactNode | ((columnKey: keyof T) => ReactNode | null);
}
export interface TableHeaderProps<TDatum extends object> {
    children: ReactNode | ((column: ColumnInfo<TDatum>) => ReactNode);
    columns: ColumnInfo<TDatum>;
}
export declare type TableLoadingStatus = 'idle' | 'stale' | 'skeleton';
export declare type ColumnOrGroup<TRow extends object, TColumnKey = KeyOf<TRow>> = ColumnInfo<TRow, TColumnKey> | ColumnGroup<TRow, TColumnKey>;
export declare type ColumnsOf<TRow extends object, TColumnKey = KeyOf<TRow>> = ColumnOrGroup<TRow, TColumnKey>[];
export declare type ColumnKey<TColumns extends ColumnsOf<any>> = Extract<TColumns[number], ColumnInfo<any>>['key'] | Extract<TColumns[number], ColumnGroup<any>>['columns'][number]['key'];
export declare type TableScrollviewFade = {
    left: boolean;
    right: boolean;
};
