import { __exports as e } from "./index-_virtual26.js";
import d from "react";
import { __require as _ } from "./index-LexicalComposerContext2.js";
import { __require as m } from "./index-Lexical.js";
import { __require as C } from "./index-convertHtmlToNodes.js";
var l;
function P() {
  if (l) return e;
  l = 1, Object.defineProperty(e, "__esModule", { value: !0 }), e.ControlledValuePlugin = void 0;
  const n = d, u = _(), r = m(), i = C();
  function s(a) {
    const { value: t } = a, [o] = (0, u.useLexicalComposerContext)();
    return (0, n.useEffect)(() => {
      o.getEditorState().read(() => {
        o.update(() => {
          const c = (0, i.convertHtmlToNodes)(t, o);
          (0, r.$getRoot)().clear(), (0, r.$insertNodes)(c);
        });
      });
    }, [t]), null;
  }
  return e.ControlledValuePlugin = s, e;
}
export {
  P as __require
};
