import { Fn, KeyValueType, Recordable } from '@maxax/types';
import { VxePagerDefines, VxePagerProps } from 'vxe-pc-ui';
import { FormActionType } from '../basic-form/interface';
export type BasicListPageItemKey = number | string;
export type GetListPageItemKey = (record: Record<string, any>) => BasicListPageItemKey;
export type BasicListPagePagerProps = VxePagerProps;
export interface ListPageFetchSetting {
    pageField: string;
    sizeField: string;
    listField: string;
    totalField: string;
}
export interface BasicListPageProps {
    listClassName?: string;
    itemClassName?: string | ((record: Recordable) => string);
    loading?: boolean;
    card?: boolean;
    uid?: string;
    immediate?: boolean;
    api?: (...arg: any) => Promise<any>;
    dynamicApi?: (params?: Recordable) => (...arg: any) => Promise<any>;
    beforeFetch?: Fn;
    afterFetch?: Fn;
    handleSearchInfoFn?: Fn;
    fetchSetting?: Partial<ListPageFetchSetting>;
    defSort?: Recordable;
    searchInfo?: Recordable;
    useSearchForm?: boolean;
    pagination?: BasicListPagePagerProps | boolean;
    rKey?: string | GetListPageItemKey;
    relationForm?: () => FormActionType | null;
    data?: Recordable[];
}
export interface ListPageFetchParams {
    searchInfo?: Recordable;
    page?: number;
    sortInfo?: Recordable;
    filterInfo?: Recordable;
}
export type ListPagePageChangeEventParams = VxePagerDefines.PageChangeEventParams;
export interface BasicListPageEmitType {
    (_e: 'fetch-success'): void;
    (_e: 'fetch-error'): void;
    (_e: 'page-change', params: ListPagePageChangeEventParams): void;
}
export interface ListPageActionType {
    emit: BasicListPageEmitType;
    reload: (opt?: ListPageFetchParams) => Promise<Array<Recordable<any>> | undefined>;
    setLoading: (loading: boolean) => void;
    setProps: (props: Partial<BasicListPageProps>) => void;
    getListPageProps: () => BasicListPageProps;
    setPagination: (info: Partial<BasicListPagePagerProps>) => void;
    setShowPagination: (show: boolean) => Promise<void>;
    getShowPagination: () => boolean;
    getPaginationRef: () => BasicListPagePagerProps | boolean;
    setListData: <T = Recordable>(values: T[]) => void;
    updateListData: (index: number, key: BasicListPageItemKey, value: any) => Promise<Recordable | undefined>;
    updateListDataRecord: (keyValue: BasicListPageItemKey, record: Recordable) => Recordable | undefined;
    deleteListDataRecord: (keyValues: BasicListPageItemKey | BasicListPageItemKey[]) => void;
    insertListDataRecord: (record: Recordable | Recordable[], index?: number) => Recordable[] | undefined;
    findListDataRecord: (keyValue: BasicListPageItemKey) => Recordable | undefined;
    mergeListDataRecord: (records: Recordable[], key: KeyValueType) => void;
    getDataSource: <T = Recordable>() => T[];
    getRawDataSource: <T = Recordable>() => T;
    getSearchInfo: <T = Recordable>() => T;
    handleSearchInfoChange: (info?: Recordable) => void;
    handleSearchInfoReload: (info?: Recordable) => void;
}
export interface BasicListPageContext {
    name: string;
}
//# sourceMappingURL=interface.d.ts.map