import { jsx as s } from "react/jsx-runtime";
import { createContext as p, useContext as n, useMemo as x } from "react";
import { getEditorWrapperClassNames as d } from "../components/EditorPositioningWrapper/index.es.js";
import { EditorResizeContextProvider as c } from "./EditorResizeContext.es.js";
import { Position as C } from "../components/EditorPositioningWrapper/types.es.js";
import { defaultStyles as l } from "../utils/defaultStyles.es.js";
const e = p({
  styles: l,
  position: C.FLOATING,
  wrapperClassNames: "",
  editorId: ""
});
e.displayName = "RichTextEditorContext";
const T = () => n(e), v = ({
  children: m,
  styles: r,
  position: t,
  border: o,
  editorId: i
}) => {
  const a = x(
    () => ({
      styles: r,
      editorId: i,
      position: t,
      wrapperClassNames: d(t, o)
    }),
    [r, i, t, o]
  );
  return /* @__PURE__ */ s(e.Provider, { value: a, children: /* @__PURE__ */ s(c, { children: m }) });
};
export {
  e as RichTextEditorContext,
  v as RichTextEditorProvider,
  T as useRichTextEditorContext
};
//# sourceMappingURL=RichTextEditorContext.es.js.map
