const require_runtime = require("../../../_virtual/_rolldown/runtime.js");
let react = require("react");
react = require_runtime.__toESM(react);
//#region src/components/ticketBooking/context/OsKeyContext.tsx
const OsKeyContext = (0, react.createContext)({ osKey: void 0 });
/**
* OsKey Provider
* 提供 osKey 给子组件使用
*/
const OsKeyProvider = ({ osKey, children }) => {
	return /* @__PURE__ */ react.default.createElement(OsKeyContext.Provider, { value: { osKey } }, children);
};
/**
* useOsKey Hook
* 在子组件中使用此 hook 获取 osKey
*/
const useOsKey = () => {
	const context = (0, react.useContext)(OsKeyContext);
	if (!context) throw new Error("useOsKey must be used within an OsKeyProvider");
	return (context === null || context === void 0 ? void 0 : context.osKey) || "ticket";
};
//#endregion
exports.OsKeyProvider = OsKeyProvider;
exports.useOsKey = useOsKey;
