"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Functional_1 = require("../../../../../Class/Functional");
const fromBundle_1 = require("../../../../../spec/fromBundle");
const _ids_1 = require("../../../../_ids");
class FromBundle extends Functional_1.Functional {
    constructor(system) {
        super({
            i: ['bundle'],
            o: ['graph'],
        }, {
            output: {},
        }, system, _ids_1.ID_FROM_BUNDLE);
    }
    f({ bundle }, done) {
        let graph;
        try {
            graph = (0, fromBundle_1.fromBundle)(bundle, this.__system.specs, {});
        }
        catch (err) {
            done(undefined, err.message);
            return;
        }
        done({ graph });
    }
}
exports.default = FromBundle;
//# sourceMappingURL=index.js.map