/// <reference types="react" />
import { ICTableFilters } from './CTableFilter';
export type TCTableKey = string | number;
export declare enum SearchMode {
    SINGLE = 1,
    MULTI = 2
}
export interface ICTableContext<K> {
    defs: ICTableDefs<K>;
    loadItems?: (params: ICTableLoadItemsParams) => TLoadReturns<K> | Promise<TLoadReturns<K>>;
    sortedItems: K[];
    renderTable: () => void;
    loading: boolean;
    filters: ICTableFilters;
    defaultFilters: ICTableFilters;
    toggleFilters?: boolean;
    isToggle: boolean;
    setIsToggle: React.Dispatch<React.SetStateAction<boolean>>;
    onSearch: (newFilters: ICTableFilters) => void;
    markable: boolean;
    sort: ISort;
    onSortClick: (key: TCTableKey) => void;
    activeItems: K[];
    pagination: IPagination;
    onPageChange: (newPage: number) => void;
    totalCount: number;
    onPageSizeChange: (newPageSize: number) => void;
    tableId: string;
    tableRef: React.MutableRefObject<HTMLDivElement | null>;
    tableContainerRef: React.MutableRefObject<HTMLDivElement | null>;
    tableWidth: number | undefined;
    isSameItem: (a: K, b: K) => boolean;
}
export declare const CTableContext: import("react").Context<ICTableContext<any>>;
export interface ICTableItem {
    [key: TCTableKey]: React.ReactNode;
}
export interface ICTableDefContentRender {
    tableBodyBodyCell: () => void;
    tableBodyBodyRow: () => void;
    tableBodyBody: () => void;
    tableBody: () => void;
}
export interface ICTableDef<K> {
    label?: TCTableKey;
    content?: ((item: K) => {
        content: React.ReactNode;
        text?: string;
    } | React.ReactNode) | ({
        content: React.ReactNode;
        text?: string;
    } | React.ReactNode);
    headerContent?: () => React.ReactNode;
    maxWidth?: number;
    fixWidth?: number;
    width?: number;
    minWidth?: number;
    align?: 'flex-start' | 'center' | 'flex-end';
    useSort?: boolean;
    useTooltip?: boolean;
    sortFunc?: TCompFunc;
    conditionalDef?: (item: K) => ICTableDef<K>;
    conditionalTooltip?: (item: K) => React.ReactNode;
    colSpan?: number;
    cellContainerStyle?: ((item: K) => React.CSSProperties | undefined | void) | React.CSSProperties;
    cellStyle?: ((item: K) => React.CSSProperties) | React.CSSProperties;
    disableLocalSearch?: boolean;
}
export interface ICTableRef<K> {
    activeItems?: K[];
    setActiveItems?: React.Dispatch<React.SetStateAction<K[]>>;
    resetFilters?: () => void;
}
export interface ICTableDefs<K> {
    [key: TCTableKey]: ICTableDef<K>;
}
export interface ILoadReturns<K> {
    items: K[];
    totalCount: number;
}
export type TLoadReturns<K> = ILoadReturns<K> | undefined | void;
export interface ICTableProps<K> {
    defs: ICTableDefs<K>;
    items?: K[];
    idx?: keyof K;
    tableRef?: React.MutableRefObject<ICTableRef<K> | undefined>;
    showType?: 'pagination' | 'scroll';
    loadItems?: (params: ICTableLoadItemsParams) => TLoadReturns<K> | Promise<TLoadReturns<K>>;
    itemsReload?: boolean;
    filtersReset?: boolean;
    loading?: boolean;
    rowStyle?: React.CSSProperties | ((item: K) => React.CSSProperties | undefined | void);
    rowClassName?: string | ((item: K) => string | undefined | void);
    rowOnClick?: (item: K, func: () => void) => void;
    totalCount?: number;
    singleFilterValue?: string;
    singleFilterPlaceholder?: string;
    singleFilterAutofocus?: boolean;
    singleFilterWidth?: number | string;
    singleFilterValidation?: (filterValue: any) => string | undefined;
    defaultFilters?: ICTableFilters;
    toggleFilters?: ICTableFilters;
    defaultPagination?: IPaginationParams;
    defaultSort?: ISort;
    useCheck?: [K[], React.Dispatch<React.SetStateAction<K[]>>];
    useSelect?: [K[], React.Dispatch<React.SetStateAction<K[]>>];
    useAsterisk?: string;
    tableContainerStyle?: React.CSSProperties;
    tableStyle?: React.CSSProperties;
    tableHeaderStyle?: React.CSSProperties;
    tableBodyStyle?: React.CSSProperties;
    tableFooterStyle?: React.CSSProperties;
    tableBodyHeaderHeight?: number;
    topLeftAddon?: React.ReactNode;
    topRightAddon?: React.ReactNode;
    bottomLeftAddon?: React.ReactNode;
    bottomRightAddon?: React.ReactNode;
    itemCountUnit?: string;
    useMaxTotalCount?: [0 | 1, React.Dispatch<React.SetStateAction<0 | 1>>];
    titleText?: React.ReactNode;
    noContentMsg?: string;
    showRows?: number;
    checkDisabled?: (item: K) => string | void | undefined | boolean;
    rowDisabled?: (item: K) => string | void | undefined | boolean;
    disablePageSizeSelect?: boolean;
    disableFilter?: boolean;
    disableHeader?: boolean;
    disableFooter?: boolean;
    disablePagination?: boolean;
    disableGrow?: boolean;
    disableLoadOnLoadChange?: boolean;
    disableCountText?: boolean;
    disableDeselect?: boolean;
    disableFilterMarking?: boolean;
    tableWidth?: number;
    setMulti?: () => void;
}
export interface ISort {
    key?: TCTableKey;
    asc?: boolean;
}
export type TCompFunc = (a: any, b: any, asc: boolean) => number;
export interface IPagination {
    page: number;
    pageSize: number;
    pageRange: number;
}
export interface IPaginationParams {
    page?: number;
    pageSize?: number;
    pageRange?: number;
}
export interface ICTableLoadItemsParams {
    sort: ISort;
    filters: ICTableFilters;
    pagination: IPagination;
}
