"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Semifunctional_1 = require("../../../../Class/Semifunctional");
const _ids_1 = require("../../../_ids");
class Transistor extends Semifunctional_1.Semifunctional {
    constructor(system) {
        super({
            fi: ['a'],
            fo: ['a'],
            i: ['b'],
            o: [],
        }, {}, system, _ids_1.ID_TRANSISTOR);
    }
    f({ a }, done) {
        if (this._input.b.peak() === true) {
            done({ a });
        }
    }
    onIterDataInputData(name, data) {
        // if (name === 'b') {
        if (data === true) {
            const a = this._input.a.peak();
            if (a !== undefined) {
                this._done({ a });
            }
        }
        // }
    }
}
exports.default = Transistor;
//# sourceMappingURL=index.js.map