import { jsxDEV, Fragment } from "react/jsx-dev-runtime";
import { Component, useEntity } from "@contember/react-binding";
import { EmptyStateContainer, Message } from "@contember/ui";
import { SearchX } from "lucide-react";
const NotFoundBoundary = Component(
  ({ children }) => {
    const accessor = useEntity();
    const node = accessor.environment.getSubTree();
    if (node.expectedCardinality === "one" && !accessor.existsOnServer) {
      return /* @__PURE__ */ jsxDEV(EmptyStateContainer, { intent: "danger", header: /* @__PURE__ */ jsxDEV(SearchX, {}, void 0, false, {
        fileName: "/__w/interface/interface/packages/admin/src/components/pageRouting/Scopes/NotFoundBoundary.tsx",
        lineNumber: 13,
        columnNumber: 50
      }, void 0), children: /* @__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: 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__ */ jsxDEV(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__ */ jsxDEV(Fragment, { children }, void 0, false, {
    fileName: "/__w/interface/interface/packages/admin/src/components/pageRouting/Scopes/NotFoundBoundary.tsx",
    lineNumber: 21,
    columnNumber: 20
  }, void 0)
);
export {
  NotFoundBoundary
};
//# sourceMappingURL=NotFoundBoundary.js.map
