"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DataBridgeConnectionManager = void 0;
// TODO: what is managed here except current active application?
class DataBridgeConnectionManager {
    static set(name, body) {
        if (body === 'start') {
            if (DataBridgeConnectionManager.getActive() === '' || DataBridgeConnectionManager.getActive() === name) {
                DataBridgeConnectionManager.activeConn[name] = true;
            }
        }
        else if (body === 'exit') {
            DataBridgeConnectionManager.activeConn[name] = false;
        }
    }
    static getActive() {
        var _a;
        return (((_a = Object.keys(DataBridgeConnectionManager.activeConn)
            .find(appName => DataBridgeConnectionManager.activeConn[appName] == true)) === null || _a === void 0 ? void 0 : _a.toString()) || '');
    }
}
exports.DataBridgeConnectionManager = DataBridgeConnectionManager;
DataBridgeConnectionManager.activeConn = {};
//# sourceMappingURL=data-bridge-manager.js.map