"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxDevRuntime = require("react/jsx-dev-runtime");
const reactBinding = require("@contember/react-binding");
const useReferencedEntity = require("./useReferencedEntity.cjs");
const slateReact = require("slate-react");
const ReferenceElementWrapper = ({ children, element }) => {
  const editor = slateReact.useSlateStatic();
  const path = slateReact.ReactEditor.findPath(editor, element);
  const ref = useReferencedEntity.useReferencedEntity(path, element.referenceId);
  return /* @__PURE__ */ jsxDevRuntime.jsxDEV(reactBinding.AccessorProvider, { accessor: ref, children }, void 0, false, {
    fileName: "/__w/interface/interface/packages/admin/src/components/bindingFacade/richText/blockEditor/references/ReferenceElementWrapper.tsx",
    lineNumber: 16,
    columnNumber: 9
  }, void 0);
};
exports.ReferenceElementWrapper = ReferenceElementWrapper;
//# sourceMappingURL=ReferenceElementWrapper.cjs.map
