const require_runtime = require("../../../_virtual/_rolldown/runtime.js");
let react = require("react");
react = require_runtime.__toESM(react);
//#region src/components/ticketBooking/context/IsActiveContext.tsx
const IsActiveContext = (0, react.createContext)({ isActive: true });
/**
* IsActive Provider
* 提供 isActive 给子组件使用
*/
const IsActiveProvider = ({ isActive, children }) => {
	return /* @__PURE__ */ react.default.createElement(IsActiveContext.Provider, { value: { isActive } }, children);
};
/**
* useIsActive Hook
* 在子组件中使用此 hook 获取 isActive 状态
*/
const useIsActive = () => {
	const context = (0, react.useContext)(IsActiveContext);
	if (!context) throw new Error("useIsActive must be used within an IsActiveProvider");
	return context.isActive;
};
//#endregion
exports.IsActiveProvider = IsActiveProvider;
exports.useIsActive = useIsActive;
