"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LifeCycleParser = void 0;
class LifeCycleParser {
    onStart(context) {
        this.lifeCycle = {};
    }
    parseModule(pageId, mod) {
        var _a;
        const lifeCycleObj = ((_a = mod.exports) === null || _a === void 0 ? void 0 : _a.default) || mod.exports;
        if (typeof lifeCycleObj === 'object') {
            this.lifeCycle[pageId] = lifeCycleObj;
        }
        else {
            throw new Error('lifecycle must export an object');
        }
    }
    onEnd(context) {
        context.lifeCycle = this.lifeCycle;
    }
}
exports.LifeCycleParser = LifeCycleParser;
//# sourceMappingURL=lifecycleParser.js.map