import { ConfigService } from '../index';
export class Base {
    constructor() {
        /*
        * Javascript Application base class: initializes global '_abl' namespace
        * */
        this._environment = { type: 'js', namespace: '_ema' };
        this._config = 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);
    }
}
//# sourceMappingURL=base.js.map