import type * as React from 'react';
import type { COLUMNS, SORT_DIRECTIONS } from './constants';
export declare type SortDirections = typeof SORT_DIRECTIONS[keyof typeof SORT_DIRECTIONS];
export declare type Columns = typeof COLUMNS[keyof typeof COLUMNS];
export declare type SharedColumnOptions<Value> = {
    cellBlockAlign?: 'start' | 'center' | 'end';
    fillWidth?: boolean;
    filterable?: boolean;
    mapDataToValue: (data: any) => Value;
    maxWidth?: number;
    minWidth?: number;
    sortable?: boolean;
    title: string;
};
export declare type RenderCell<Value> = React.ComponentType<{
    value: Value;
    isMeasured?: boolean;
    isSelected?: boolean;
    onSelect?: () => void;
    textQuery?: string;
    x: number;
    y: number;
}>;
export declare type RenderFilter<Value, FilterParams> = React.ComponentType<{
    close: () => void;
    data: Value[];
    filterParams?: FilterParams;
    setFilter: (a: FilterParams) => void;
}>;
export declare type ColumnOptions<Value = any, FilterParams = any> = {
    kind: Columns;
    sortable: boolean;
    renderCell: RenderCell<Value>;
    renderFilter: RenderFilter<Value, FilterParams>;
    buildFilter: (a: FilterParams) => (a: Value) => boolean;
    textQueryFilter?: (b: string, a: Value) => boolean;
    sortFn: (b: Value, a: Value) => number;
} & SharedColumnOptions<Value>;
export declare type Row = {
    id: number | string;
    data: any;
};
export declare type BatchAction = {
    label: string;
    onClick: (a: {
        clearSelection: () => unknown;
        event: React.SyntheticEvent<HTMLButtonElement>;
        selection: Row[];
    }) => unknown;
    renderIcon?: React.ComponentType<{
        size: number;
    } & any>;
};
export declare type RowAction = {
    label: string;
    onClick: (a: {
        event: React.SyntheticEvent<HTMLButtonElement>;
        row: Row;
    }) => unknown;
    renderIcon: React.ComponentType<{
        size: number;
    } & any>;
    renderButton?: React.ComponentType<{}>;
};
export declare type ImperativeMethods = {
    getRows: () => Row[];
};
export declare type ControlRef = {
    current: ImperativeMethods | null;
};
export declare type StatefulDataTableProps = {
    batchActions?: BatchAction[];
    columns: ColumnOptions[];
    emptyMessage?: string | React.ComponentType<{}>;
    filterable?: boolean;
    initialFilters?: Map<string, {
        description: string;
    }>;
    initialSelectedRowIds?: Set<number | string>;
    initialSortIndex?: number;
    initialSortDirection?: SortDirections;
    loading?: boolean;
    loadingMessage?: string | React.ComponentType<{}>;
    onFilterAdd?: (b: string, a: {
        description: string;
    }) => unknown;
    onFilterRemove?: (a: string) => unknown;
    onIncludedRowsChange?: (rows: Row[]) => void;
    onRowHighlightChange?: (rowIndex: number, row: Row) => void;
    onSelectionChange?: (a: Row[]) => unknown;
    resizableColumnWidths?: boolean;
    rows: Row[];
    rowActions?: RowAction[] | ((a: Row) => RowAction[]);
    rowHeight?: number;
    rowHighlightIndex?: number;
    searchable?: boolean;
    controlRef?: ControlRef;
};
export declare type DataTableProps = {
    emptyMessage?: string | React.ComponentType<{}>;
    filters?: Map<string, {
        description: string;
    }>;
    loading?: boolean;
    loadingMessage?: string | React.ComponentType<{}>;
    onIncludedRowsChange?: (rows: Row[]) => void;
    onRowHighlightChange?: (rowIndex: number, row: Row) => void;
    onSelectMany?: (rows: Row[]) => void;
    onSelectNone?: () => void;
    onSelectOne?: (row: Row) => void;
    onSort?: (columnIndex: number) => void;
    resizableColumnWidths?: boolean;
    rowHighlightIndex?: number;
    selectedRowIds?: Set<string | number>;
    sortIndex?: number;
    sortDirection?: SortDirections;
    textQuery?: string;
} & StatefulDataTableProps;
export declare type StatefulContainerProps = {
    children: (a: {
        filters: Map<string, {
            description: string;
        }>;
        onFilterAdd: (title: string, filterParams: {
            description: string;
        }) => void;
        onFilterRemove: (title: string) => void;
        onIncludedRowsChange: (rows: Row[]) => void;
        onRowHighlightChange: (rowIndex: number, row: Row) => void;
        onSelectMany: (rows: Row[]) => void;
        onSelectNone: () => void;
        onSelectOne: (row: Row) => void;
        onSort: (columnIndex: number) => void;
        onTextQueryChange: (query: string) => void;
        resizableColumnWidths: boolean;
        rowHighlightIndex?: number;
        selectedRowIds: Set<string | number>;
        sortIndex: number;
        sortDirection: SortDirections;
        textQuery: string;
    }) => React.ReactNode;
} & StatefulDataTableProps;
