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