"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Semifunctional_1 = require("../../../Class/Semifunctional");
const Value_1 = require("../../../wrap/Value");
const _ids_1 = require("../../_ids");
class State extends Semifunctional_1.Semifunctional {
    constructor(system) {
        super({
            fi: ['init'],
            fo: ['data'],
            i: ['done'],
            o: [],
        }, {
            output: {
                data: {
                    ref: true,
                },
            },
        }, system, _ids_1.ID_STATE);
    }
    f({ init }, done) {
        const data = (0, Value_1.wrapValue)(init, this.__system);
        done({
            data,
        });
    }
    onIterDataInputData(name, data) {
        // if (name === 'done') {
        this._backward('init');
        this._backward('done');
        // }
    }
}
exports.default = State;
//# sourceMappingURL=index.js.map