"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 pageComponent = require("./pageComponent.cjs");
const LayoutRenderer = require("../../bindingFacade/renderers/LayoutRenderer.cjs");
const FeedbackRenderer = require("../../bindingFacade/renderers/FeedbackRenderer.cjs");
const PersistButton = require("../../bindingFacade/buttons/PersistButton.cjs");
const CreatePage = pageComponent.pageComponent(
  ({ pageName, children, rendererProps, redirectOnSuccess, onPersistSuccess, ...entityProps }) => {
    return /* @__PURE__ */ jsxRuntime.jsx(reactBinding.DataBindingProvider, { stateComponent: FeedbackRenderer.FeedbackRenderer, children: /* @__PURE__ */ jsxRuntime.jsx(reactBinding.EntitySubTree, { ...entityProps, onPersistSuccess: useOnPersistSuccess.useOnPersistSuccess({ redirectOnSuccess, onPersistSuccess }), isCreating: true, children: /* @__PURE__ */ jsxRuntime.jsx(LayoutRenderer.LayoutRenderer, { ...rendererProps, actions: rendererProps?.actions ?? /* @__PURE__ */ jsxRuntime.jsx(PersistButton.PersistButton, {}), children }) }) });
  },
  "CreatePage"
);
exports.CreatePage = CreatePage;
//# sourceMappingURL=CreatePage.cjs.map
