import { jsxDEV } from "react/jsx-dev-runtime";
import { AccessorProvider } from "@contember/react-binding";
import { useReferencedEntity } from "./useReferencedEntity.js";
import { useSlateStatic, ReactEditor } from "slate-react";
const ReferenceElementWrapper = ({ children, element }) => {
  const editor = useSlateStatic();
  const path = ReactEditor.findPath(editor, element);
  const ref = useReferencedEntity(path, element.referenceId);
  return /* @__PURE__ */ jsxDEV(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);
};
export {
  ReferenceElementWrapper
};
//# sourceMappingURL=ReferenceElementWrapper.js.map
