"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const integration_base_1 = require("@things-factory/integration-base");
const debug = require('debug')('aidoop:robotics:increment-count-tick');
async function IncrementCounterTick(step, { logger, domain, closures, state }) {
    var { connection } = step;
    var connectionInstance = integration_base_1.ConnectionManager.getConnectionInstanceByName(domain, connection);
    if (!connectionInstance) {
        throw Error(`connection is not found : ${connectionInstance}`);
    }
    connectionInstance.incrementCount += 1;
    logger.info(`incrementCount: (${connectionInstance.incrementCount})`);
    return {
        data: connectionInstance.incrementCount
    };
}
IncrementCounterTick.parameterSpec = [];
IncrementCounterTick.help = 'robotics/task/increment-count-tick';
integration_base_1.TaskRegistry.registerTaskHandler('increment-count-tick', IncrementCounterTick);
//# sourceMappingURL=increment-counter-tick.js.map