"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxRuntime = require("react/jsx-runtime");
const React = require("react");
function createSafeContext(errorMessage) {
  const Context = React.createContext(null);
  const useSafeContext = () => {
    const ctx = React.useContext(Context);
    if (ctx === null) {
      throw new Error(errorMessage);
    }
    return ctx;
  };
  const Provider = ({ children, value }) => /* @__PURE__ */ jsxRuntime.jsx(Context.Provider, { value, children });
  return [Provider, useSafeContext];
}
exports.createSafeContext = createSafeContext;
