"use client";
let react = require("react");
//#region packages/@mantine/core/src/core/utils/create-safe-context/create-safe-context.tsx
function createSafeContext(errorMessage) {
	const Context = (0, react.createContext)(null);
	const useSafeContext = () => {
		const ctx = (0, react.use)(Context);
		if (ctx === null) throw new Error(errorMessage);
		return ctx;
	};
	return [Context, useSafeContext];
}
//#endregion
exports.createSafeContext = createSafeContext;

//# sourceMappingURL=create-safe-context.cjs.map