import { jsxDEV } from "react/jsx-dev-runtime";
import { DataBindingProvider, EntitySubTree } from "@contember/react-binding";
import { useOnPersistSuccess } from "../useOnPersistSuccess.js";
import { pageComponent } from "./pageComponent.js";
import { LayoutRenderer } from "../../bindingFacade/renderers/LayoutRenderer.js";
import { FeedbackRenderer } from "../../bindingFacade/renderers/FeedbackRenderer.js";
import { PersistButton } from "../../bindingFacade/buttons/PersistButton.js";
const CreatePage = pageComponent(
  ({ pageName, children, rendererProps, redirectOnSuccess, onPersistSuccess, ...entityProps }) => {
    return /* @__PURE__ */ jsxDEV(DataBindingProvider, { stateComponent: FeedbackRenderer, children: /* @__PURE__ */ jsxDEV(EntitySubTree, { ...entityProps, onPersistSuccess: useOnPersistSuccess({ redirectOnSuccess, onPersistSuccess }), isCreating: true, children: /* @__PURE__ */ jsxDEV(LayoutRenderer, { ...rendererProps, actions: rendererProps?.actions ?? /* @__PURE__ */ jsxDEV(PersistButton, {}, void 0, false, {
      fileName: "/__w/interface/interface/packages/admin/src/components/pageRouting/pageComponents/CreatePage.tsx",
      lineNumber: 44,
      columnNumber: 76
    }, void 0), children }, void 0, false, {
      fileName: "/__w/interface/interface/packages/admin/src/components/pageRouting/pageComponents/CreatePage.tsx",
      lineNumber: 44,
      columnNumber: 6
    }, void 0) }, void 0, false, {
      fileName: "/__w/interface/interface/packages/admin/src/components/pageRouting/pageComponents/CreatePage.tsx",
      lineNumber: 43,
      columnNumber: 5
    }, void 0) }, void 0, false, {
      fileName: "/__w/interface/interface/packages/admin/src/components/pageRouting/pageComponents/CreatePage.tsx",
      lineNumber: 42,
      columnNumber: 4
    }, void 0);
  },
  "CreatePage"
);
export {
  CreatePage
};
//# sourceMappingURL=CreatePage.js.map
