import { createContext as o } from "../../../../../../preact@10.29.0/node_modules/preact/dist/preact.module.js";
import { useEffect as u, useContext as n } from "../../../../../../preact@10.29.0/node_modules/preact/hooks/dist/hooks.module.js";
import { jsx as i } from "../../../../../../preact@10.29.0/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js";
var t = o(
  void 0
), m = (r) => {
  const e = n(t);
  if (!e)
    throw new Error("No QueryClient set, use QueryClientProvider to set one");
  return e;
}, v = ({
  client: r,
  children: e
}) => (u(() => (r.mount(), () => {
  r.unmount();
}), [r]), /* @__PURE__ */ i(t.Provider, { value: r, children: e }));
export {
  t as QueryClientContext,
  v as QueryClientProvider,
  m as useQueryClient
};
