"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Functional_1 = require("../../../../Class/Functional");
const _ids_1 = require("../../../_ids");
const f_1 = require("./f");
class Set extends Functional_1.Functional {
    constructor(system) {
        super({
            i: ['obj', 'key', 'value'],
            o: ['obj'],
        }, {}, system, _ids_1.ID_SET);
    }
    f({ obj, key, value }, done) {
        // console.log('Set_normal', 'f', obj, key, value)
        if (this.isPinRef('input', 'obj')) {
            obj[key] = value;
        }
        if (this.isPinRef('output', 'obj')) {
            done({ obj });
        }
        else {
            done({ obj: (0, f_1.default)(obj, key, value) });
        }
    }
}
exports.default = Set;
//# sourceMappingURL=index.js.map