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