"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AzureKinnectCamera = void 0;
const integration_base_1 = require("@things-factory/integration-base");
const robotics_types_1 = require("../../controllers/robotics-types");
class AzureKinnectCamera {
    async ready(connectionConfigs) {
        await Promise.all(connectionConfigs.map(this.connect.bind(this)));
        integration_base_1.ConnectionManager.logger.info('azure-kinnect-camera connections are ready');
    }
    async connect(connection) {
        integration_base_1.ConnectionManager.addConnectionInstance(connection, Object.assign({ discriminator: robotics_types_1.ROBOTICS_OBJECT_TYPES.CAMERA }, connection));
        integration_base_1.ConnectionManager.logger.info(`azure-kinnect-camera connection(${connection.name}:${connection.endpoint}) is connected`);
    }
    async disconnect(connection) {
        integration_base_1.ConnectionManager.removeConnectionInstance(connection);
        integration_base_1.ConnectionManager.logger.info(`azure-kinnect-camera connection(${connection.name}) is disconnected`);
    }
    trace(storage) { }
    capture() { }
    configure() { }
    get parameterSpec() {
        return [
            {
                type: 'string',
                label: 'device',
                name: 'device'
            },
            {
                type: 'entity-selector',
                label: 'base-robot-arm',
                name: 'baseRobotArm',
                property: {
                    queryName: 'robotArms',
                    valueKey: 'name'
                }
            },
            {
                type: 'camera-calibration',
                label: 'camera calibration',
                name: 'cameraCalibration'
            },
            //   {
            //     type: 'camera-roi',
            //     label: 'rois',
            //     name: 'rois'
            //   },
            {
                type: 'handeye-config',
                label: 'handeye configuration',
                name: 'handEyeConfig'
            },
            {
                type: 'handeye-calibration',
                label: 'handeye matrix',
                name: 'handEyeMatrix'
            },
            {
                type: 'offset-pose-simple',
                label: 'camera object offset',
                name: 'camObjOffset'
            }
        ];
    }
    get taskPrefixes() {
        return ['azure'];
    }
    get help() {
        return 'robotics/connector/azure-kinnect-camera';
    }
}
exports.AzureKinnectCamera = AzureKinnectCamera;
integration_base_1.ConnectionManager.registerConnector('azure-kinnect-camera', new AzureKinnectCamera());
//# sourceMappingURL=azure-kinnect-camera.js.map