"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Semifunctional_1 = require("../../../../../Class/Semifunctional");
const start_1 = require("../../../../../start");
const _ids_1 = require("../../../../_ids");
class New extends Semifunctional_1.Semifunctional {
    constructor(system) {
        super({
            fi: ['graph'],
            fo: ['graph'],
            i: ['done'],
        }, {
            output: {
                graph: {
                    ref: true,
                },
            },
        }, system, _ids_1.ID_NEW_0);
    }
    f({ graph: graphClass }, done) {
        // console.log('New', 'f', bundle)
        const { unit, specs = {} } = graphClass.__bundle;
        this.__system.injectSpecs(specs);
        const spec = this.__system.getSpec(unit.id);
        const graph = (0, start_1.start)(this.__system, { spec, specs });
        done({ graph });
    }
    onIterDataInputData(name, data) {
        // if (name === 'done') {
        this._forward_all_empty();
        this._backward('graph');
        this._backward('done');
        // }
    }
}
exports.default = New;
//# sourceMappingURL=index.js.map