"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getHandeyeResultResolver = void 0;
const robotics_types_1 = require("../../../controllers/robotics-types");
const integration_base_1 = require("@things-factory/integration-base");
const data_bridge_1 = require("../../../controllers/data-bridge/data-bridge");
exports.getHandeyeResultResolver = {
    async getHandeyeResult(_, { name }, context) {
        const { domain } = context.state;
        var camera = integration_base_1.ConnectionManager.getConnectionInstanceByName(domain, name);
        if (!camera || camera.discriminator !== robotics_types_1.ROBOTICS_OBJECT_TYPES.CAMERA) {
            throw Error(`Tracking Camera '${name}' Not Found`);
        }
        var dataBridgeName = 'handeyecalib' + ':' + name;
        data_bridge_1.dataBridge.sendCmdToExt('result', dataBridgeName);
        // TODO: check if this kina return value is available
        return true;
    }
};
//# sourceMappingURL=get-handeye-result.js.map