import { c } from "react-compiler-runtime";
import React, { Suspense, lazy } from "react";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
//#region src/providers/QueryProvider.tsx
const ReactQueryDevtools = lazy(() => import("@tanstack/react-query-devtools").then((m) => ({ default: m.ReactQueryDevtools })));
const queryClient = new QueryClient({ defaultOptions: { queries: {
	staleTime: 5 * 6e4,
	gcTime: 10 * 6e4,
	retry: 1,
	refetchOnWindowFocus: false
} } });
const QueryProvider = (t0) => {
	const $ = c(5);
	const { children, showDevTools: t1 } = t0;
	const showDevTools = t1 === void 0 ? false : t1;
	let t2;
	if ($[0] !== showDevTools) {
		t2 = showDevTools && /* @__PURE__ */ React.createElement(Suspense, { fallback: null }, /* @__PURE__ */ React.createElement(ReactQueryDevtools, { initialIsOpen: false }));
		$[0] = showDevTools;
		$[1] = t2;
	} else t2 = $[1];
	let t3;
	if ($[2] !== children || $[3] !== t2) {
		t3 = /* @__PURE__ */ React.createElement(QueryClientProvider, { client: queryClient }, children, t2);
		$[2] = children;
		$[3] = t2;
		$[4] = t3;
	} else t3 = $[4];
	return t3;
};
//#endregion
export { QueryProvider };

//# sourceMappingURL=QueryProvider.mjs.map