"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var index_1 = require("../index");
var Base = /** @class */ (function () {
    function Base() {
        /*
        * Javascript Application base class: initializes global '_ema' namespace
        * */
        this._environment = { type: 'js', namespace: '_ema' };
        this._config = index_1.ConfigService.instance;
        console.log(this, this._config);
        // browser
        if (typeof window !== 'undefined') {
            this._environment.type = 'browser';
            if (window['angular']) {
                this._environment.framework = 'angular-js';
            }
            if (!window['angular']) {
                this._environment.framework = 'angular';
            }
            if (!window[this._environment.namespace]) {
                window[this._environment.namespace] = {};
            }
        }
        // nodejs
        if (typeof window === 'undefined') {
            this._environment.type = 'nodejs';
            this._environment.framework = 'nodejs';
        }
        this._environment.date = new Date();
        this._environment.started = Math.round(+new Date() / 1000);
    }
    return Base;
}());
exports.Base = Base;
//# sourceMappingURL=base.js.map