"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LifeCycleParser = void 0;
var LifeCycleParser = /** @class */ (function () {
    function LifeCycleParser() {
    }
    LifeCycleParser.prototype.onStart = function (context) {
        this.lifeCycle = {};
    };
    LifeCycleParser.prototype.parseModule = function (pageId, mod) {
        var _a;
        var 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');
        }
    };
    LifeCycleParser.prototype.onEnd = function (context) {
        context.lifeCycle = this.lifeCycle;
    };
    return LifeCycleParser;
}());
exports.LifeCycleParser = LifeCycleParser;
//# sourceMappingURL=lifecycleParser.js.map