/**

 *  generic hook to query data list
 * @template ListItem
 * @param Params - query params type, e.g. { page: number; perPage: number }
 * @param option.fetchList: (params, extra) => Promise<{ items: ListItem[] }>
 * @returns loading, dataList, fetchData, cancelRequest
 */
type QueryResponse<ListItem, T extends 'array' | 'object'> = T extends 'array' ? ListItem[] : Global.PageResponse<ListItem>;
export declare function useQueryDataList<ListItem, Params = any, T extends 'array' | 'object' = 'array'>(option: {
    key: string;
    responseType?: T;
    fetchList: (params: Params, options?: any) => Promise<Global.PageResponse<ListItem>>;
    getLabel?: (item: ListItem) => string;
    getValue?: (item: ListItem) => any;
    errorMsg?: string;
    debounceWait?: number;
}): {
    loading: boolean;
    dataList: Array<ListItem & {
        label: string;
        value: any;
    }>;
    cancelRequest: () => void;
    fetchData: (params: Params, extra?: any) => Promise<QueryResponse<ListItem, T>>;
};
export declare function useQueryData<Detail, Params = any>(option: {
    key: string;
    delay?: number;
    fetchDetail: (params: Params, options?: any) => Promise<Detail>;
    getData?: (response: Detail, params?: any) => any;
    errorMsg?: string;
}): {
    loading: boolean;
    detailData: Detail;
    cancelRequest: () => void;
    fetchData: (params: Params, extra?: any) => Promise<Detail>;
};
export {};
