"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HandlerParser = void 0;
class HandlerParser {
    onStart(context) {
        this.handler = {};
    }
    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.handler[pageId] = this.handler[pageId] || {};
            this.handler[pageId][folder] = mod.exports.default;
        }
        else
            this.handler[pageId] = mod.exports.default;
    }
    onEnd(context) {
        context.handler = this.handler;
    }
}
exports.HandlerParser = HandlerParser;
//# sourceMappingURL=handlerParser.js.map