import { TdHTMLAttributes } from 'react';
import { SortOrder } from '@parlor/constants/types';
export declare namespace ITableHeader {
    type BaseHeader<T> = {
        canBeHidden?: boolean;
        id?: string;
        isSortable?: boolean;
        name: T;
        title: string;
        width?: number;
    };
    type SortableHeader<T> = Omit<BaseHeader<T>, 'isSortable'> & {
        isSortable: true;
    };
    type UnSortableHeader = Omit<BaseHeader<string>, 'isSortable'> & {
        isSortable: false;
    };
    type Header<T> = SortableHeader<T> | UnSortableHeader;
    type HeaderWithCell<T> = Header<T> & {
        cell: JSX.Element;
        id: string;
    };
}
export declare enum DropType {
    Column = "column",
    Row = "row"
}
export type DragAndDropState = {
    draggableId: DropType;
    draggableIndex: number;
    droppableId?: DropType;
    droppingIndex: number;
};
export type Headers<T extends string = string> = {
    activeColumn: T;
    sortOrder: SortOrder;
};
export type SetSelectAllRowsPayload = {
    isSelected: boolean;
    rows: string[];
};
export type Selection = Record<string | number, boolean>;
export type TdProps = Omit<TdHTMLAttributes<HTMLTableCellElement>, 'children'>;
export type TableState = {
    dragAndDropState: DragAndDropState;
    headers: Headers;
    isSetInitialActiveHeader?: boolean;
    selection: Selection;
};
export declare enum TableActionType {
    SetActiveHeader = "SetActiveHeader",
    SetDragAndDropState = "SetDragAndDropState",
    SetInitialActiveHeader = "SetInitialActiveHeader",
    SetSelectAllRows = "SetSelectAllRows",
    ToggleRow = "ToggleRow"
}
export type TableActionSetInitialActiveHeader = {
    action: TableActionType.SetInitialActiveHeader;
    payload: Headers;
};
export type TableActionSetActiveHeader = {
    action: TableActionType.SetActiveHeader;
    payload: Headers;
};
export type TableActionToggleRow = {
    action: TableActionType.ToggleRow;
    payload: string;
};
export type TableActionSetSelectAllRows = {
    action: TableActionType.SetSelectAllRows;
    payload: SetSelectAllRowsPayload;
};
export type TableActionSetDragAndDropState = {
    action: TableActionType.SetDragAndDropState;
    payload: DragAndDropState;
};
export type TableAction = TableActionSetActiveHeader | TableActionSetInitialActiveHeader | TableActionToggleRow | TableActionSetDragAndDropState | TableActionSetSelectAllRows;
export interface ITableContext {
    getSelectedRow: (row?: {
        id: string;
    }) => boolean;
    tableDispatch: React.Dispatch<TableAction>;
    tableState: TableState;
}
