import { Identifiable, ISelectFilterStore, OptionItemValue } from '@custis/common';
import { Column, ColumnInstance, IdType, UsePaginationInstanceProps } from 'react-table';
import { FunctionComponent, Key, ReactNode } from 'react';
import { FormItemProps } from 'antd/lib/form/FormItem';
export type TTableRowMode = 'view' | 'create' | 'edit' | 'create-sub-row' | 'edit-sub-row';
export type TCellType = 'number' | 'integer' | 'date' | 'string' | 'division' | 'icon';
export type TCellField = 'number' | 'integer' | 'string' | 'select' | 'date' | 'checkbox' | 'no-field' | 'component' | 'multi-select';
export type TFilterWithId<T> = T & {
    id?: number[];
};
export type TTableColumn<T extends Identifiable, TFilter, TSorting, TFilterKey = any> = Column<T> & {
    type?: TCellType;
    fieldType?: TCellField;
    editable?: ((row: T) => boolean) | boolean;
    store?: ISelectFilterStore<OptionItemValue>;
    required?: boolean;
    Component?: FunctionComponent<T>;
    formItemProps?: FormItemProps<T>;
    filterName?: keyof TFilter;
    sortingName?: TSorting;
    columns?: TTableColumn<T, TFilter, TSorting>[];
    rawHeader?: string;
    extraColumn?: boolean;
    specialProps?: any;
    isVisible?: boolean;
    clue?: IColumnClue;
    selectFilterEmptyOption?: boolean;
    selectFilterEmptyLabel?: string;
    onlyFilter?: boolean;
};
export type HeaderColumn<T extends Identifiable, TFilter, TSorting> = ColumnInstance<T> & TTableColumn<T, TFilter, TSorting>;
export declare enum TableRenderComponents {
    Header = "Header",
    Filter = "Filter",
    Cell = "Cell"
}
export declare enum MouseActions {
    Click = "click",
    Hover = "hover"
}
export type FilterMapping<TItem, TFilter> = Record<keyof Partial<TItem>, keyof Partial<TFilter>>;
export type SortingMapping<TItem, TSorting> = Record<keyof Partial<TItem>, TSorting>;
export declare const SELECTION_COLUMN_ID = "selection";
export type PaginationProps<TItem extends Identifiable> = Omit<UsePaginationInstanceProps<TItem> & {
    pageIndex: number;
    pageSize: number;
}, 'page' | 'pageOptions'>;
export interface IHiddenColumn<TItem> {
    title: IdType<TItem>;
    visible: boolean;
    touched?: boolean;
}
export interface IColumnClue {
    icon?: ReactNode;
    content: ReactNode;
    position?: 'left' | 'right';
}
export declare enum ExpandMode {
    OPENED = "opened",
    CLOSED = "closed",
    MIXED = "mixed"
}
export interface ISavedGridState<TItem> {
    id: IdType<TItem> | undefined;
    title: string;
    visible: boolean;
    width: number;
    children?: ISavedGridState<TItem>[];
    parentId?: IdType<TItem>;
    pinned?: boolean;
}
export interface IVisibleColumns {
    checked: Key[];
    halfChecked: Key[];
}
