import { jsxDEV, Fragment } from "react/jsx-dev-runtime";
import { Component, useEntity } from "@contember/binding";
import { Message } from "@contember/ui";
const NotFoundBoundary = Component(
  ({ children }) => {
    const accessor = useEntity();
    const node = accessor.environment.getSubTree();
    if (node.expectedCardinality === "one" && !accessor.existsOnServer) {
      return /* @__PURE__ */ jsxDEV(Message, { intent: "danger", children: [
        "Requested entity of type ",
        accessor.name,
        " was not found"
      ] }, void 0, true, {
        fileName: "/__w/interface/interface/packages/admin/src/components/pageRouting/Scopes/NotFoundBoundary.tsx",
        lineNumber: 12,
        columnNumber: 5
      }, globalThis);
    } else {
      return /* @__PURE__ */ jsxDEV(Fragment, { children }, void 0, false, {
        fileName: "/__w/interface/interface/packages/admin/src/components/pageRouting/Scopes/NotFoundBoundary.tsx",
        lineNumber: 15,
        columnNumber: 11
      }, globalThis);
    }
  },
  ({ children }) => /* @__PURE__ */ jsxDEV(Fragment, { children }, void 0, false, {
    fileName: "/__w/interface/interface/packages/admin/src/components/pageRouting/Scopes/NotFoundBoundary.tsx",
    lineNumber: 18,
    columnNumber: 20
  }, globalThis)
);
export {
  NotFoundBoundary
};
//# sourceMappingURL=NotFoundBoundary.js.map
