"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.robotArmsResolver = void 0;
const robotics_types_1 = require("../../../controllers/robotics-types");
const integration_base_1 = require("@things-factory/integration-base");
exports.robotArmsResolver = {
    async robotArms(_, {}, context) {
        const { domain } = context.state;
        var items = Object.keys(integration_base_1.ConnectionManager.getConnectionInstances(domain))
            .map(name => integration_base_1.ConnectionManager.getConnectionInstanceByName(domain, name))
            .filter(connection => connection.discriminator == robotics_types_1.ROBOTICS_OBJECT_TYPES.ROBOT_ARM)
            .map(connection => {
            var { markerOffset, toolOffset } = connection.params || {};
            return Object.assign(Object.assign({}, connection), { markerOffset,
                toolOffset });
        });
        return {
            items,
            total: items.length
        };
    }
};
//# sourceMappingURL=robot-arms.js.map