import { ComputedRef, Ref } from 'vue';
import { KeyValueType, Recordable, ReturnEmitType } from '@maxax/types';
import { BasicPagerProps, BasicTableProps, BasicTableRowKey, FetchParams, TableSortFilter, VxePagerEvents } from '../interface';
interface UseDataSourceActionType {
    getPaginationInfo: Ref<boolean | BasicPagerProps>;
    setPagination: (info: Partial<BasicPagerProps>) => void;
    setLoading: (loading: boolean) => void;
    clearSelectedRowKeys: () => void;
    setSelection: () => void;
    tableData: Ref<Recordable[]>;
    emit: ReturnEmitType;
}
export declare function useDataSource(propsRef: ComputedRef<BasicTableProps>, { tableData, getPaginationInfo, setPagination, setSelection, setLoading, emit }: UseDataSourceActionType): {
    getRowKey: ComputedRef<string | import('../interface').GetRowKey | undefined>;
    getRowConfigRef: ComputedRef<{
        rowConfig: {
            keyField: string | import('../interface').GetRowKey | undefined;
            useKey?: boolean | undefined;
            isCurrent?: boolean | undefined;
            currentMethod?: ((params: {
                row: any;
            }) => boolean) | undefined;
            isHover?: boolean | undefined;
            resizable?: boolean | undefined;
            height?: number | undefined;
            drag?: boolean | undefined;
        };
    }>;
    searchInfoRef: Ref<Recordable<any>, Recordable<any>>;
    getAutoCreateKey: ComputedRef<boolean | undefined>;
    getDataSourceRef: Ref<Recordable<any>[], Recordable<any>[]>;
    getSortRef: ComputedRef<TableSortFilter<import("vxe-pc-ui/types/components/table").VxeTablePropTypes.Row> | null>;
    fetch: (opt?: FetchParams) => Promise<Recordable<any>[] | undefined>;
    reload: (opt?: FetchParams) => Promise<Recordable<any>[] | undefined>;
    onPageChange: VxePagerEvents.PageChange;
    getDataSource: <T = Recordable<any>>() => T[];
    getTableData: <T_1 = Recordable<any>>() => T_1[];
    getRawDataSource: <T_2 = Recordable<any>>() => T_2;
    getSearchInfo: <T_3 = Recordable<any>>() => T_3;
    setTableData: <T_4 = Recordable<any>>(values: T_4[]) => void;
    updateTableData: (index: number, key: BasicTableRowKey, value: any) => Promise<Recordable<any>>;
    updateTableDataRecord: (keyValue: BasicTableRowKey, record: Recordable) => Recordable | undefined;
    deleteTableDataRecord: (keyValues: BasicTableRowKey | BasicTableRowKey[]) => void;
    insertTableDataRecord: (record: Recordable | Recordable[], index?: number) => Recordable[] | undefined;
    findTableDataRecord: (keyValue: BasicTableRowKey) => Record<string, any> | undefined;
    getTableRowKey: () => string | import('../interface').GetRowKey | undefined;
    mergeTableDataRecord: (records: Recordable[], key?: KeyValueType) => void;
};
export {};
//# sourceMappingURL=use-data-source.d.ts.map