import useEngineContext from "../../../hooks/useEngineContext.js";
//#region src/components/ticketBooking/hooks/useRuntime.ts
const useRuntime = () => {
	var _context$appHelper, _context$appHelper$ge, _app$getPlugin, _app$getPlugin$useRun;
	const context = useEngineContext();
	const app = context === null || context === void 0 || (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 || (_context$appHelper = _context$appHelper.utils) === null || _context$appHelper === void 0 || (_context$appHelper$ge = _context$appHelper.getApp) === null || _context$appHelper$ge === void 0 ? void 0 : _context$appHelper$ge.call(_context$appHelper);
	const { runtime } = (app === null || app === void 0 || (_app$getPlugin = app.getPlugin) === null || _app$getPlugin === void 0 || (_app$getPlugin = _app$getPlugin.call(app, "unifiedCommunication")) === null || _app$getPlugin === void 0 || (_app$getPlugin$useRun = _app$getPlugin.useRuntime) === null || _app$getPlugin$useRun === void 0 ? void 0 : _app$getPlugin$useRun.call(_app$getPlugin)) || {};
	return {
		runtime,
		isSecondaryScreen: (runtime === null || runtime === void 0 ? void 0 : runtime.role) === "secondary-screen"
	};
};
//#endregion
export { useRuntime };
