import { jsxDEV } from "react/jsx-dev-runtime";
import { Box, SpinnerOverlay } from "@contember/ui";
function QueryLoader({ query, children }) {
  if (query.state === "error") {
    return /* @__PURE__ */ jsxDEV(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__ */ jsxDEV(SpinnerOverlay, {}, void 0, false, {
      fileName: "/__w/interface/interface/packages/admin/src/tenant/components/QueryLoader.tsx",
      lineNumber: 10,
      columnNumber: 10
    }, this);
  }
  return children({ query });
}
export {
  QueryLoader
};
//# sourceMappingURL=QueryLoader.js.map
