import { DataIndex } from '@aplus-frontend/antdv/es/vc-table/interface';
import { ComputedRef, Ref } from 'vue';
import { ApFormSearchFormExpose } from '../../ap-form';
import { RequestData } from '../interface';
import { TablePaginationConfig } from '@aplus-frontend/antdv';
import { FilterValue, SorterResult, TableCurrentDataSource } from '@aplus-frontend/antdv/es/table/interface';
import { ApColumnType } from '..';
import { Recordable } from '../../type';
export type UseTablePagingParams<DataType, ParamsType> = {
    request: (params: any) => Promise<RequestData<DataType>>;
    /**
     * 是否手动执行，页面初始化后不执行网络请求，需要手动触发
     * @param params
     * @returns
     */
    manual?: boolean;
    /**
     * @description 默认情况下，请求第几页
     * @default 1
     */
    defaultCurrent?: number;
    /**
     * 默认每页请求的数据条数
     * @default 10
     */
    defaultPageSize?: number;
    /**
     * 额外的默认请求参数，这个参数变更不会触发网络请求
     */
    defaultParams?: ParamsType;
    /**
     * 默认的数据源
     */
    defaultData?: DataType[];
    /**
     * 数据请求前格式化请求参数
     * @param values
     * @returns
     */
    formatParams?: (values: any) => any;
    /**
     * 特殊类型参数类型对照表（会根据该对照表运行默认的参数格式化）
     */
    paramsValueTypeMap?: Record<string, any>;
    /**
     * 重设表单需要忽略的字段
     */
    resetFieldsIgnores?: string[];
    /**
     * 需要后端筛选的字段列表
     */
    filterFields?: ComputedRef<DataIndex[]>;
    /**
     * 需要后端筛选的排序字段列表
     */
    sortFields?: ComputedRef<DataIndex[]>;
    /**
     * 是否显示基础分页（较少的现实内容）
     */
    showLessItems?: boolean;
    /**
     * 用于显示数据总量和当前数据顺序
     */
    showTotal?: boolean;
    /**
     * 是否分页
     */
    pagination?: boolean;
};
/**
 * ApTable表格分页请求和管理数据实现
 * @deprecated 已弃用，将在下一个次要版本移出，请自行实现
 * @param param0
 * @returns
 */
export declare const useTablePaging: <DataType = any, ParamsType = Record<string, any>>({ manual, defaultCurrent, defaultPageSize, request, defaultParams, defaultData, formatParams, paramsValueTypeMap, resetFieldsIgnores, filterFields, sortFields, showLessItems, showTotal, pagination }: UseTablePagingParams<DataType, ParamsType>) => {
    formRef: Ref<ApFormSearchFormExpose | undefined, ApFormSearchFormExpose | undefined>;
    submit: () => void;
    reset: () => void;
    refresh: () => void;
    refreshByDelete: (n: number) => void;
    data: Ref<{
        total: number;
        records: DataType[];
        loading: boolean;
    }, {
        total: number;
        records: DataType[];
        loading: boolean;
    }>;
    current: Ref<number | undefined, number | undefined>;
    pageSize: Ref<number | undefined, number | undefined>;
    handleTableChange: (pagination: TablePaginationConfig, filters: Record<string, FilterValue | null>, sorter: SorterResult<any> | SorterResult<any>[], extra: TableCurrentDataSource<any>) => void;
    tableProps: ComputedRef<{
        loading: boolean;
        pagination: {
            current: number;
            pageSize: number;
            total: number;
            showSizeChanger: boolean;
            showQuickJumper: boolean;
            showLessItems: boolean;
            size: string;
            showTotal: ((total: number) => import("vue/jsx-runtime").JSX.Element) | undefined;
        };
        onChange: (pagination: TablePaginationConfig, filters: Record<string, FilterValue | null>, sorter: SorterResult<any> | SorterResult<any>[], extra: TableCurrentDataSource<any>) => void;
        dataSource: DataType[];
    }>;
    dataSource: ComputedRef<DataType[]>;
    setDataSource: (dataSource?: DataType[]) => void;
    getColumnSFConfig: (column: ApColumnType, append?: boolean) => Recordable;
};
