"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.IncrementCountConnector = void 0;
const integration_base_1 = require("@things-factory/integration-base");
const debug = require('debug')('aidoop:integration-base:increment-count-connector');
class IncrementCountConnector {
    async ready(connectionConfigs) {
        await Promise.all(connectionConfigs.map(this.connect.bind(this)));
        integration_base_1.ConnectionManager.logger.info('increment-count-connector connections are ready');
    }
    async connect(connection) {
        var { params } = connection;
        var incrementCount = 0;
        integration_base_1.ConnectionManager.addConnectionInstance(connection, Object.assign(Object.assign({}, connection), { params,
            incrementCount }));
        integration_base_1.ConnectionManager.logger.info(`increment-count-connector connection(${connection.name}:${connection.endpoint}) is connected`);
    }
    async disconnect(connection) {
        integration_base_1.ConnectionManager.removeConnectionInstance(connection);
        integration_base_1.ConnectionManager.logger.info(`increment-count-connector connection(${connection.name}) is disconnected`);
    }
    get parameterSpec() {
        return [];
    }
    get taskPrefixes() {
        return ['increment-count'];
    }
    get help() {
        return 'robotics/connector/increment-count-connector';
    }
}
exports.IncrementCountConnector = IncrementCountConnector;
integration_base_1.ConnectionManager.registerConnector('increment-count-connector', new IncrementCountConnector());
//# sourceMappingURL=increment-counter.js.map