"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createSubSystem = void 0;
const Semifunctional_1 = require("../../../../../Class/Semifunctional");
const Async_1 = require("../../../../../types/interface/async/Async");
const System_1 = require("../../../../../wrap/System");
const _ids_1 = require("../../../../_ids");
class Boot extends Semifunctional_1.Semifunctional {
    constructor(system) {
        super({
            fi: ['init'],
            fo: ['system'],
            i: ['done'],
            o: [],
        }, {
            output: {
                system: {
                    ref: true,
                },
            },
        }, system, _ids_1.ID_BOOT);
    }
    f({ init }, done) {
        const { path } = init;
        const _system = this.__system.boot({
            path,
            specs: this.__system.specs,
            classes: this.__system.classes,
            components: this.__system.components,
        });
        const system = (0, System_1.wrapSystem)(_system, this.__system);
        const $system = (0, Async_1.Async)(system, ['S']);
        done({
            system: $system,
        });
    }
}
exports.default = Boot;
function createSubSystem(system, path) { }
exports.createSubSystem = createSubSystem;
//# sourceMappingURL=index.js.map