"use client";
import { jsx } from "react/jsx-runtime";
import { createContext, useContext } from "react";
import { MakeswiftHostApiClient } from "../../api/react";
const Context = createContext(
  new MakeswiftHostApiClient({
    uri: "https://api.makeswift.com/graphql",
    fetch: async (url, init) => {
      console.warn(
        "Using fallback `fetch` implementation, resource revalidation may not work as expected.",
        { url }
      );
      return fetch(url, init);
    }
  })
);
function useMakeswiftHostApiClient() {
  return useContext(Context);
}
function MakeswiftHostApiClientProvider({
  client,
  children
}) {
  return /* @__PURE__ */ jsx(Context.Provider, { value: client, children });
}
export {
  MakeswiftHostApiClientProvider,
  useMakeswiftHostApiClient
};
//# sourceMappingURL=host-api-client.js.map