"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Holder_1 = require("../../../../Class/Holder");
const Async_1 = require("../../../../types/interface/async/Async");
const _ids_1 = require("../../../_ids");
class Debug extends Holder_1.Holder {
    constructor(system) {
        super({
            fi: ['unit', 'opt'],
            fo: [],
            i: [],
            o: ['moment'],
        }, {
            input: {
                unit: {
                    ref: true,
                },
            },
        }, system, _ids_1.ID_DEBUG);
    }
    f({ unit, opt }, done, fail) {
        unit = (0, Async_1.Async)(unit, ['U'], this.__system.async);
        try {
            unit.$watch(opt, (moment) => {
                this._output.moment.push(moment);
            });
        }
        catch (err) {
            fail(err.message);
            return;
        }
    }
}
exports.default = Debug;
//# sourceMappingURL=index.js.map