"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxRuntime = require("react/jsx-runtime");
const reactBinding = require("@contember/react-binding");
const useOnPersistSuccess = require("../useOnPersistSuccess.cjs");
const reactBindingUi = require("@contember/react-binding-ui");
const pageComponent = require("./pageComponent.cjs");
const FeedbackRenderer = require("../../bindingFacade/renderers/FeedbackRenderer.cjs");
const LayoutRenderer = require("../../bindingFacade/renderers/LayoutRenderer.cjs");
const PersistButton = require("../../bindingFacade/buttons/PersistButton.cjs");
const EditPage = pageComponent.pageComponent(
  ({ pageName, children, rendererProps, redirectOnSuccess, onPersistSuccess, refreshDataBindingOnPersist, skipBindingStateUpdateAfterPersist, ...entityProps }) => /* @__PURE__ */ jsxRuntime.jsx(
    reactBinding.DataBindingProvider,
    {
      stateComponent: FeedbackRenderer.FeedbackRenderer,
      refreshOnPersist: refreshDataBindingOnPersist ?? true,
      skipStateUpdateAfterPersist: skipBindingStateUpdateAfterPersist,
      children: /* @__PURE__ */ jsxRuntime.jsx(reactBinding.EntitySubTree, { ...entityProps, onPersistSuccess: useOnPersistSuccess.useOnPersistSuccess({ redirectOnSuccess, onPersistSuccess }), children: /* @__PURE__ */ jsxRuntime.jsx(reactBindingUi.NotFoundWrapper, { title: rendererProps?.title, children: /* @__PURE__ */ jsxRuntime.jsx(LayoutRenderer.LayoutRenderer, { ...rendererProps, actions: rendererProps?.actions ?? /* @__PURE__ */ jsxRuntime.jsx(PersistButton.PersistButton, {}), children }) }) })
    }
  ),
  "EditPage"
);
exports.EditPage = EditPage;
//# sourceMappingURL=EditPage.cjs.map
