import { jsx } from "react/jsx-runtime";
import { DataBindingProvider, EntitySubTree } from "@contember/binding";
import { memo } from "react";
import { useOnPersistSuccess } from "../useOnPersistSuccess.js";
import { FeedbackRenderer } from "../../bindingFacade/renderers/FeedbackRenderer.js";
const CreateScope = memo(
  ({ children, redirectOnSuccess, onPersistSuccess, ...entityProps }) => {
    return /* @__PURE__ */ jsx(DataBindingProvider, { stateComponent: FeedbackRenderer, children: /* @__PURE__ */ jsx(EntitySubTree, { ...entityProps, onPersistSuccess: useOnPersistSuccess({ redirectOnSuccess, onPersistSuccess }), isCreating: true, children }) });
  }
);
CreateScope.displayName = "CreateScope";
export {
  CreateScope
};
//# sourceMappingURL=CreateScope.js.map
