"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxDevRuntime = require("react/jsx-dev-runtime");
const ui = require("@contember/ui");
function QueryLoader({ query, children }) {
  if (query.state === "error") {
    return /* @__PURE__ */ jsxDevRuntime.jsxDEV(ui.Box, { intent: "danger", children: "Error loading data" }, void 0, false, {
      fileName: "/__w/interface/interface/packages/admin/src/tenant/components/QueryLoader.tsx",
      lineNumber: 7,
      columnNumber: 10
    }, this);
  }
  if (query.state === "loading") {
    return /* @__PURE__ */ jsxDevRuntime.jsxDEV(ui.SpinnerOverlay, {}, void 0, false, {
      fileName: "/__w/interface/interface/packages/admin/src/tenant/components/QueryLoader.tsx",
      lineNumber: 10,
      columnNumber: 10
    }, this);
  }
  return children({ query });
}
exports.QueryLoader = QueryLoader;
//# sourceMappingURL=QueryLoader.cjs.map
