"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getTrackingWorkspace = void 0;
const integration_base_1 = require("@things-factory/integration-base");
const robotics_types_1 = require("../../controllers/robotics-types");
function getTrackingWorkspace(domain) {
    var connectionNames = Object.keys(integration_base_1.ConnectionManager.getConnectionInstances(domain));
    var candidateName = connectionNames.find(name => integration_base_1.ConnectionManager.getConnectionInstanceByName(domain, name).discriminator == robotics_types_1.ROBOTICS_OBJECT_TYPES.WORKSPACE);
    return candidateName && integration_base_1.ConnectionManager.getConnectionInstanceByName(domain, candidateName);
}
exports.getTrackingWorkspace = getTrackingWorkspace;
//# sourceMappingURL=get-tracking-workspace.js.map