"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.fromUnitBundle = fromUnitBundle;
const weakMerge_1 = require("../weakMerge");
const bundleClass_1 = require("./bundleClass");
const fromId_1 = require("./fromId");
function fromUnitBundle(bundle, specs, classes) {
    const { unit, specs: _specs = {} } = bundle;
    const { id } = unit;
    const Class = (0, fromId_1.classFromId)(id, (0, weakMerge_1.weakMerge)(_specs, specs), classes, {});
    const Bundle = (0, bundleClass_1.bundleClass)(Class, bundle, specs);
    return Bundle;
}
//# sourceMappingURL=fromUnitBundle.js.map