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