"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxDevRuntime = require("react/jsx-dev-runtime");
const reactBinding = require("@contember/react-binding");
const ui = require("@contember/ui");
const lucideReact = require("lucide-react");
const NotFoundBoundary = reactBinding.Component(
  ({ children }) => {
    const accessor = reactBinding.useEntity();
    const node = accessor.environment.getSubTree();
    if (node.expectedCardinality === "one" && !accessor.existsOnServer) {
      return /* @__PURE__ */ jsxDevRuntime.jsxDEV(ui.EmptyStateContainer, { intent: "danger", header: /* @__PURE__ */ jsxDevRuntime.jsxDEV(lucideReact.SearchX, {}, void 0, false, {
        fileName: "/__w/interface/interface/packages/admin/src/components/pageRouting/Scopes/NotFoundBoundary.tsx",
        lineNumber: 13,
        columnNumber: 50
      }, void 0), children: /* @__PURE__ */ jsxDevRuntime.jsxDEV(ui.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: 14,
        columnNumber: 6
      }, void 0) }, void 0, false, {
        fileName: "/__w/interface/interface/packages/admin/src/components/pageRouting/Scopes/NotFoundBoundary.tsx",
        lineNumber: 13,
        columnNumber: 5
      }, void 0);
    } else {
      return /* @__PURE__ */ jsxDevRuntime.jsxDEV(jsxDevRuntime.Fragment, { children }, void 0, false, {
        fileName: "/__w/interface/interface/packages/admin/src/components/pageRouting/Scopes/NotFoundBoundary.tsx",
        lineNumber: 18,
        columnNumber: 11
      }, void 0);
    }
  },
  ({ children }) => /* @__PURE__ */ jsxDevRuntime.jsxDEV(jsxDevRuntime.Fragment, { children }, void 0, false, {
    fileName: "/__w/interface/interface/packages/admin/src/components/pageRouting/Scopes/NotFoundBoundary.tsx",
    lineNumber: 21,
    columnNumber: 20
  }, void 0)
);
exports.NotFoundBoundary = NotFoundBoundary;
//# sourceMappingURL=NotFoundBoundary.cjs.map
