"use client";
import { jsx, jsxs } from "react/jsx-runtime";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
import { useState } from "react";
function QueryProvider({ children }) {
  const [queryClient] = useState(
    () => new QueryClient({
      defaultOptions: {
        queries: {
          staleTime: 60 * 1e3,
          refetchOnWindowFocus: false
        }
      }
    })
  );
  return /* @__PURE__ */ jsxs(QueryClientProvider, { client: queryClient, children: [
    children,
    process.env.NEXT_PUBLIC_RQ_DEVTOOLS === "true" && /* @__PURE__ */ jsx(ReactQueryDevtools, { initialIsOpen: false })
  ] });
}
export {
  QueryProvider
};
