/**
 * 便捷的 Hook：获取当前应用实例的事件总线
 */ "use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "useEventBus", {
    enumerable: true,
    get: function() {
        return useEventBus;
    }
});
const _AppInstance = require("../startup/AppInstance");
function useEventBus() {
    const instanceManager = (0, _AppInstance.getAppInstanceManager)();
    const instance = instanceManager.getInstance();
    if (!instance) {
        throw new Error('应用实例未找到');
    }
    const eventBus = instance.getEventBus();
    if (!eventBus) {
        throw new Error('事件总线未初始化');
    }
    return eventBus;
}

//# sourceMappingURL=useEventBus.js.map