"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Holder_1 = require("../../../../../Class/Holder");
const _ids_1 = require("../../../../_ids");
class New extends Holder_1.Holder {
    constructor(system) {
        super({
            fi: ['graph'],
            fo: ['graph'],
            i: [],
        }, {
            output: {
                graph: {
                    ref: true,
                },
            },
        }, system, _ids_1.ID_NEW_0);
    }
    f({ graph: Class }, done) {
        const graph = new Class(this.__system);
        this._graph = graph;
        done({ graph });
    }
    d() {
        if (this._graph) {
            this._graph.destroy();
            this._graph = undefined;
        }
    }
}
exports.default = New;
//# sourceMappingURL=index.js.map