require("./chunk-9hOWP6kD.cjs");
let react = require("react");
//#region ../../mysite/core/src/mysite-api-context.ts
const MySiteApiContext = (0, react.createContext)(null);
const MySiteApiProvider = MySiteApiContext.Provider;
function useMySiteApi() {
	const api = (0, react.useContext)(MySiteApiContext);
	if (!api) throw new Error("useMySiteApi must be used within a MySiteApiProvider");
	return api;
}
//#endregion
Object.defineProperty(exports, "MySiteApiProvider", {
	enumerable: true,
	get: function() {
		return MySiteApiProvider;
	}
});
Object.defineProperty(exports, "useMySiteApi", {
	enumerable: true,
	get: function() {
		return useMySiteApi;
	}
});

//# sourceMappingURL=mysite-api-context-Dz4lI5Xd.cjs.map