import { ComputedRef, Ref } from 'vue';
import { KeyValueType, Recordable, ReturnEmitType } from '@maxax/types';
import { VxePagerEvents } from 'vxe-pc-ui';
import { BasicListPageItemKey, BasicListPagePagerProps, BasicListPageProps, ListPageFetchParams } from '../interface';
interface UseDataSourceActionType {
    getPaginationInfo: Ref<boolean | BasicListPagePagerProps>;
    setPagination: (info: Partial<BasicListPagePagerProps>) => void;
    setLoading: (loading: boolean) => void;
    tableData: Ref<Recordable[]>;
    emit: ReturnEmitType;
}
export declare function useDataSource(propsRef: ComputedRef<BasicListPageProps>, { tableData, getPaginationInfo, setPagination, setLoading, emit }: UseDataSourceActionType): {
    searchInfoRef: Ref<Recordable<any>, Recordable<any>>;
    getDataSourceRef: Ref<Recordable<any>[], Recordable<any>[]>;
    fetch: (opt?: ListPageFetchParams) => Promise<Recordable<any>[] | undefined>;
    reload: (opt?: ListPageFetchParams) => Promise<Recordable<any>[] | undefined>;
    onPageChange: VxePagerEvents.PageChange;
    getDataSource: <T = Recordable<any>>() => T[];
    getRawDataSource: <T_1 = Recordable<any>>() => T_1;
    getSearchInfo: <T_2 = Recordable<any>>() => T_2;
    setListData: <T_3 = Recordable<any>>(values: T_3[]) => void;
    updateListData: (index: number, key: BasicListPageItemKey, value: any) => Promise<Recordable<any>>;
    updateListDataRecord: (keyValue: BasicListPageItemKey, record: Recordable) => Recordable | undefined;
    deleteListDataRecord: (keyValues: BasicListPageItemKey | BasicListPageItemKey[]) => void;
    insertListDataRecord: (record: Recordable | Recordable[], index?: number) => Recordable[] | undefined;
    findListDataRecord: (keyValue: BasicListPageItemKey) => Recordable<any> | undefined;
    mergeListDataRecord: (records: Recordable[], key?: KeyValueType) => void;
};
export {};
//# sourceMappingURL=use-data-source.d.ts.map