"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const react = require("react");
const ReactDOM = require("react-dom");
const useConnectSelectedEntities = (createNewEntity) => {
  return react.useCallback((selectedEntities) => {
    ReactDOM.unstable_batchedUpdates(() => {
      for (const selected of selectedEntities) {
        createNewEntity((getEntity) => {
          selected(getEntity());
        });
      }
    });
  }, [createNewEntity]);
};
exports.useConnectSelectedEntities = useConnectSelectedEntities;
//# sourceMappingURL=useConnectSelectedEntities.cjs.map
