"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-reset');
async function IncrementCounterReset(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 = 0;
    logger.info(`incrementCount: (${connectionInstance.incrementCount})`);
    return {
        data: connectionInstance.incrementCount
    };
}
IncrementCounterReset.parameterSpec = [];
IncrementCounterReset.help = 'robotics/task/increment-count-reset';
integration_base_1.TaskRegistry.registerTaskHandler('increment-count-reset', IncrementCounterReset);
//# sourceMappingURL=increment-counter-reset.js.map