import { c } from "react/compiler-runtime";
import { createContext, useContext } from "react";
import { jsx } from "react/jsx-runtime";
var StudioContext = createContext(null);
const StudioProvider = (r) => {
	let i = c(6), { children: a, router: o, environment: s } = r, l;
	i[0] !== s || i[1] !== o ? (l = {
		router: o,
		environment: s
	}, i[0] = s, i[1] = o, i[2] = l) : l = i[2];
	let u;
	return i[3] !== a || i[4] !== l ? (u = /* @__PURE__ */ jsx(StudioContext.Provider, {
		value: l,
		children: a
	}), i[3] = a, i[4] = l, i[5] = u) : u = i[5], u;
}, useStudio = () => {
	let e = useContext(StudioContext);
	if (!e) throw Error("useStudio must be used within StudioProvider");
	return e;
};
export { StudioProvider, useStudio };
