import type { VNode, ComputedRef } from 'vue';
import { ColumnProps, ColumnPropsEx, SortOrder, VueNode } from './column';
import type { TableRowSelection } from 'ant-design-vue/lib/table/interface';
import type { TooltipProps } from 'ant-design-vue/es/tooltip';
import type { FormProps } from '../../form';
import { PaginationProps } from '../../pagination';
import type { Recordable, Key } from '../../typings/global';
import type { TitleActionItem } from './tableAction';
import type { TopTabPane } from './tableTabs';
export interface TableCustomRecord<T> {
    record?: T;
    index?: number;
}
export interface ExpandedRowRenderRecord<T> extends TableCustomRecord<T> {
    indent?: number;
    expanded?: boolean;
}
export interface SorterResult<T = any> {
    column: ColumnProps<T>;
    order: SortOrder;
    field: string;
    columnKey: string;
}
export interface TableSettingItem {
    show?: boolean;
    title?: string;
    icon?: VNode;
    extra?: Recordable;
}
export interface TableSetting {
    redo?: TableSettingItem;
    size?: TableSettingItem;
    setting?: TableSettingItem;
    fullScreen?: TableSettingItem;
}
export interface FetchSetting {
    pageField: string;
    sizeField: string;
    listField: string;
    totalField: string;
}
export declare type SizeType = 'default' | 'middle' | 'small' | 'large';
export interface TableProps<T = any> {
    bordered?: boolean;
    columns?: ColumnPropsEx<T>[];
    components?: object;
    childrenColumnName?: string;
    dataSource?: Recordable[];
    defaultExpandAllRows?: boolean;
    defaultExpandedRowKeys?: string[];
    expandedRowKeys?: string[];
    expandedRowRender?: (record?: ExpandedRowRenderRecord<T>) => VueNode;
    expandFixed?: boolean | ('left' | 'right');
    expandIcon?: (props: any) => VNode | VueNode;
    expandRowByClick?: boolean;
    expandIconColumnIndex?: number;
    footer?: (currentPageData: any) => VNode | VueNode;
    getPopupContainer?: (triggerNode?: HTMLElement) => HTMLElement;
    loading?: boolean;
    locale?: object;
    pagination?: PaginationProps | boolean;
    rowClassName?: (record: TableCustomRecord<T>, index: number) => string;
    rowKey?: string | ((record: TableCustomRecord<T>) => string);
    rowSelection?: TableRowSelection<T> | null;
    scroll?: {
        x?: string | number | true;
        y?: string | number;
        scrollToFirstRowOnChange?: boolean;
    };
    showHeader?: boolean;
    showSorterTooltip?: boolean | TooltipProps;
    size?: SizeType;
    sortDirections?: SortOrder[];
    sticky?: boolean | {
        offsetHeader?: number;
        offsetScroll?: number;
        getContainer?: () => HTMLElement;
    };
    tableLayout?: 'auto' | 'fixed' | string;
    title?: VueNode | string | ((data: Recordable) => string);
    titleActions?: TitleActionItem[];
    indentSize?: number;
    rowExpandable?: (record: T) => boolean;
    customHeaderRow?: (columns: ColumnPropsEx<T>[], index: number) => object;
    customRow?: (record: T, index: number) => object;
    transformCellText?: ({ text, column, record, index }: {
        text: any;
        column: any;
        record: any;
        index: any;
    }) => any;
    /** 以下是自定义属性  **/
    clickToRowSelect?: boolean;
    isTreeTable?: boolean;
    sortFn?: (sortInfo: SorterResult<T>) => any;
    filterFn?: (data: Recordable<string[]>) => any;
    inset?: boolean;
    showTableSetting?: boolean;
    tableSetting?: TableSetting;
    striped?: boolean;
    autoCreateKey?: boolean;
    api?: (...arg: any) => Promise<any>;
    beforeFetch?: (...arg: any[]) => any;
    afterFetch?: (...arg: T[]) => any;
    handleSearchInfoFn?: (...arg: any[]) => any;
    fetchSetting?: Partial<FetchSetting>;
    immediate?: boolean;
    emptyDataIsShowTable?: boolean;
    searchInfo?: Recordable;
    defSort?: Recordable;
    useSearchForm?: boolean;
    formConfig?: Partial<FormProps>;
    showIndexColumn?: boolean;
    indexColumnProps?: ColumnPropsEx<T>;
    actionColumn?: ColumnPropsEx<T>;
    ellipsis?: boolean;
    isCanResizeParent?: boolean;
    canResize?: boolean;
    resizeHeightOffset?: number;
    clearSelectOnPageChange?: boolean;
    titleHelpMessage?: string | string[];
    maxHeight?: number;
    beforeEditSubmit?: (...args: any[]) => any;
    cacheName?: string;
    cacheEnable?: boolean;
    showSettingColumn?: boolean;
    settingColumnProps?: ColumnPropsEx<T>;
    fixTitleEmpty?: boolean;
    topTabs?: TopTabPane[];
    topTabsActivedKey?: string;
    topTabsFetchParamkey?: string;
    stickyTitle?: boolean;
    showScrollBtns?: boolean;
    resizeFlow?: boolean;
    customPagination?: boolean;
    customPaginationSizeChangerSuffix?: string;
    draggableScroll?: boolean;
    draggableScrollDelay?: number;
    horizontalScrollUsingWheel?: boolean;
    rowHeight?: number;
    virtualList?: boolean;
    virtualOffset?: number;
}
export interface FetchParams {
    searchInfo?: Recordable;
    page?: number;
    sortInfo?: Recordable;
    filterInfo?: Recordable;
}
export interface GetColumnsParams {
    ignoreIndex?: boolean;
    ignoreAction?: boolean;
    ignoreSetting?: boolean;
    sort?: boolean;
}
export interface TableActionType {
    reload: (opt?: FetchParams) => Promise<void>;
    getSelectRows: <T = Recordable>() => T[];
    clearSelectedRowKeys: () => void;
    expandAll: () => void;
    collapseAll: () => void;
    expandRows: (keys: string[]) => void;
    getSelectRowKeys: () => Key[];
    deleteSelectRowByKey: (key: string) => void;
    setPagination: (info: Partial<PaginationProps>) => void;
    setTableData: <T extends Recordable>(values: T[]) => void;
    updateTableDataRecord: (rowKey: string | number, record: Recordable) => Recordable | void;
    deleteTableDataRecord: (rowKey: string | number | string[] | number[]) => void;
    insertTableDataRecord: (record: Recordable, index?: number) => Recordable | void;
    findTableDataRecord: (rowKey: string | number) => Recordable | void;
    getColumns: <T = any>(opt?: GetColumnsParams) => ColumnPropsEx<T>[];
    setColumns: <T = any>(columns: ColumnPropsEx<T>[] | string[]) => void;
    getDataSource: <T = Recordable>() => T[];
    getRawDataSource: <T = Recordable>() => T[];
    setLoading: (loading: boolean) => void;
    getLoading: () => ComputedRef<boolean | undefined>;
    setProps: (props: Partial<TableProps>) => void;
    redoHeight: () => void;
    setSelectedRowKeys: (rowKeys: string[] | number[]) => void;
    getPaginationRef: () => PaginationProps | boolean;
    getSize: () => SizeType;
    getRowSelection: () => TableRowSelection<Recordable> | null;
    getCacheColumns: <T = any>() => ColumnPropsEx<T>[];
    getMutationColumns: <T = any>() => ColumnPropsEx<T>[];
    resetColumns: () => void;
    emit?: (event: any, ...args: any[]) => void;
    updateTableData: (index: number, key: string, value: any) => Recordable;
    setShowPagination: (show: boolean) => Promise<void>;
    getShowPagination: () => boolean;
    setCacheColumnsByField?: <T = any>(dataIndex: string | undefined, value: ColumnPropsEx<T>) => void;
    scrollTo: (pos: string) => void;
    virtualScrollToTop?: () => void;
    virtualScrollToBottom?: () => void;
}
