"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RendererParser = void 0;
const base_1 = require("./base");
class RendererParser {
    onStart(context) {
        this.renderer = {};
    }
    parseModule(pageId, mod) {
        var _a;
        if (mod.name === '____index____')
            return;
        const [, , folder] = (_a = mod.path) === null || _a === void 0 ? void 0 : _a.split('/');
        if (folder) {
            this.renderer[pageId] = this.renderer[pageId] || {};
            this.renderer[pageId][folder] = (0, base_1.getDefaultModule)(mod.exports);
        }
        else
            this.renderer[pageId] = (0, base_1.getDefaultModule)(mod.exports);
    }
    onEnd(context) {
        context.renderer = this.renderer;
    }
}
exports.RendererParser = RendererParser;
//# sourceMappingURL=rendererParser.js.map