import { jsxDEV } from "react/jsx-dev-runtime";
import { DataBindingProvider, EntitySubTree } from "@contember/react-binding";
import { useOnPersistSuccess } from "../useOnPersistSuccess.js";
import { NotFoundWrapper } from "@contember/react-binding-ui";
import { pageComponent } from "./pageComponent.js";
import { FeedbackRenderer } from "../../bindingFacade/renderers/FeedbackRenderer.js";
import { LayoutRenderer } from "../../bindingFacade/renderers/LayoutRenderer.js";
import { PersistButton } from "../../bindingFacade/buttons/PersistButton.js";
const EditPage = pageComponent(
  ({ pageName, children, rendererProps, redirectOnSuccess, onPersistSuccess, refreshDataBindingOnPersist, skipBindingStateUpdateAfterPersist, ...entityProps }) => /* @__PURE__ */ jsxDEV(
    DataBindingProvider,
    {
      stateComponent: FeedbackRenderer,
      refreshOnPersist: refreshDataBindingOnPersist ?? true,
      skipStateUpdateAfterPersist: skipBindingStateUpdateAfterPersist,
      children: /* @__PURE__ */ jsxDEV(EntitySubTree, { ...entityProps, onPersistSuccess: useOnPersistSuccess({ redirectOnSuccess, onPersistSuccess }), children: /* @__PURE__ */ jsxDEV(NotFoundWrapper, { title: rendererProps?.title, children: /* @__PURE__ */ jsxDEV(LayoutRenderer, { ...rendererProps, actions: rendererProps?.actions ?? /* @__PURE__ */ jsxDEV(PersistButton, {}, void 0, false, {
        fileName: "/__w/interface/interface/packages/admin/src/components/pageRouting/pageComponents/EditPage.tsx",
        lineNumber: 48,
        columnNumber: 76
      }, void 0), children }, void 0, false, {
        fileName: "/__w/interface/interface/packages/admin/src/components/pageRouting/pageComponents/EditPage.tsx",
        lineNumber: 48,
        columnNumber: 6
      }, void 0) }, void 0, false, {
        fileName: "/__w/interface/interface/packages/admin/src/components/pageRouting/pageComponents/EditPage.tsx",
        lineNumber: 47,
        columnNumber: 5
      }, void 0) }, void 0, false, {
        fileName: "/__w/interface/interface/packages/admin/src/components/pageRouting/pageComponents/EditPage.tsx",
        lineNumber: 46,
        columnNumber: 4
      }, void 0)
    },
    void 0,
    false,
    {
      fileName: "/__w/interface/interface/packages/admin/src/components/pageRouting/pageComponents/EditPage.tsx",
      lineNumber: 41,
      columnNumber: 3
    },
    void 0
  ),
  "EditPage"
);
export {
  EditPage
};
//# sourceMappingURL=EditPage.js.map
