"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.startHandeyeCalibrateResolver = 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.startHandeyeCalibrateResolver = {
    async startHandeyeCalibrate(_, { 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('start', dataBridgeName);
        // TODO: check if this kina return value is available
        return true;
    }
};
//# sourceMappingURL=start-handeye-calibrate.js.map