import { __read } from "tslib";
import { getDefaultModule } from './base';
var RendererParser = /** @class */ (function () {
    function RendererParser() {
    }
    RendererParser.prototype.onStart = function (context) {
        this.renderer = {};
    };
    RendererParser.prototype.parseModule = function (pageId, mod) {
        var _a;
        if (mod.name === '____index____')
            return;
        var _b = __read((_a = mod.path) === null || _a === void 0 ? void 0 : _a.split('/'), 3), folder = _b[2];
        if (folder) {
            this.renderer[pageId] = this.renderer[pageId] || {};
            this.renderer[pageId][folder] = getDefaultModule(mod.exports);
        }
        else
            this.renderer[pageId] = getDefaultModule(mod.exports);
    };
    RendererParser.prototype.onEnd = function (context) {
        context.renderer = this.renderer;
    };
    return RendererParser;
}());
export { RendererParser };
//# sourceMappingURL=rendererParser.js.map