import { j as jsxRuntimeExports, W as WidgetsCoreContextProvider, a as WidgetsLoggerContextProvider, F as FeaturesContextProvider } from "./root-fe47297d.js";
import { r as reactExports } from "./index-c2167df6.js";
import { Q as QueryClient, j as QueryClientProvider, E as ErrorBoundary, L as Loader } from "./root-a309b12a.js";
import "./_commonjsHelpers-ca272635.js";
import "./_isIterateeCall-2d6870f8.js";
import "./client-85be4bc5.js";
import "./index-cd8d8f61.js";
const View = reactExports.lazy(() => import("./view-c3be14f3.js"));
function Root(props) {
  const queryClient = reactExports.useRef();
  queryClient.current ?? (queryClient.current = new QueryClient({
    defaultOptions: {
      queries: {
        // eslint-disable-next-line unicorn/prefer-number-properties
        staleTime: Infinity,
        // Queries should never be refetched
        // Failed queries are not subject to staleTime, disable refetch
        refetchOnReconnect: false,
        refetchOnWindowFocus: false
      }
    }
  }));
  return /* @__PURE__ */ jsxRuntimeExports.jsx(QueryClientProvider, { client: queryClient.current, children: /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetsCoreContextProvider, { core: props.core, children: /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetsLoggerContextProvider, { logger: props.logger, children: /* @__PURE__ */ jsxRuntimeExports.jsx(FeaturesContextProvider, { features: props.features, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorBoundary, { fallbackRender: (props2) => /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: String(props2.error) }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
    reactExports.Suspense,
    {
      fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-8", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Loader, { label: "Loading" }) }),
      children: /* @__PURE__ */ jsxRuntimeExports.jsx(View, { ...props })
    }
  ) }) }) }) }) });
}
export {
  Root as default
};
//# sourceMappingURL=root-67558798.js.map
