import { jsx as s } from "react/jsx-runtime";
import { createContext as c, useContext as d, useState as l } from "react";
import { appConsole as m } from "../utils/appConsole.js";
import { SelectionMode as o } from "../utils/types.js";
const t = c({
  selectionMode: o.TEXT,
  setSelectionMode: () => {
  }
}), x = () => {
  const e = d(t);
  return typeof e.selectionMode > "u" && m.error("Please use this hooks inside children component of RPProvider"), e;
}, S = ({
  children: e,
  initialSelectionMode: n = o.TEXT
}) => {
  const [r, i] = l(n);
  return /* @__PURE__ */ s(t.Provider, { value: { selectionMode: r, setSelectionMode: i }, children: e });
};
export {
  t as SelectionModeContext,
  S as SelectionModeProvider,
  x as useSelectionModeContext
};
