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