"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.trackingCamerasResolver = void 0;
const integration_base_1 = require("@things-factory/integration-base");
const robotics_types_1 = require("../../../controllers/robotics-types");
exports.trackingCamerasResolver = {
    async trackingCameras(_, {}, 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.CAMERA)
            .map(connection => {
            var { handEyeConfig, handEyeMatrix, cameraCalibration, rois, camObjOffset, width, height } = connection.params || {};
            var { cameraMatrix, distortionCoefficient } = cameraCalibration || {};
            return Object.assign(Object.assign({}, connection), { cameraMatrix,
                distortionCoefficient,
                handEyeConfig,
                handEyeMatrix,
                rois,
                camObjOffset,
                width,
                height });
        });
        return {
            items,
            total: items.length
        };
    }
};
//# sourceMappingURL=tracking-cameras.js.map