import { SWRResponse } from "swr"; import { Provider } from "../commerce"; import { CommerceError } from "./errors"; import type { Fetcher, HookFetcherFn, HookFetcherOptions, HookFetchInput, HookSWRInput, SWRHookSchemaBase, SwrOptions } from "./types"; export type ResponseState = SWRResponse & { isLoading: boolean; }; export type UseData = (options: { fetchOptions: HookFetcherOptions; fetcher: HookFetcherFn; }, input: HookFetchInput | HookSWRInput, fetcherFn: Fetcher, swrOptions?: SwrOptions, provider?: Provider) => ResponseState; declare const useData: UseData; export default useData;