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

//# sourceMappingURL=store-api-context-D1gZn22Z.cjs.map