"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Functional_1 = require("../../../../Class/Functional");
const Async_1 = require("../../../../types/interface/async/Async");
const clone_1 = require("../../../../util/clone");
const _ids_1 = require("../../../_ids");
class Bundle0 extends Functional_1.Functional {
    constructor(system) {
        super({
            i: ['unit', 'opt'],
            o: ['bundle'],
        }, {
            input: {
                unit: {
                    ref: true,
                },
            },
        }, system, _ids_1.ID_BUNDLE_0);
    }
    f({ unit, opt }, done) {
        unit = (0, Async_1.Async)(unit, ['U'], this.__system.async);
        unit.$getUnitBundleSpec(opt, (bundle) => {
            bundle = (0, clone_1.clone)(bundle);
            done({
                bundle,
            });
        });
    }
}
exports.default = Bundle0;
//# sourceMappingURL=index.js.map