import * as i0 from '@angular/core';
import { InjectionToken, Injectable, Inject } from '@angular/core';

const IS_PRODUCTION_ENV = new InjectionToken('Is Production Environment', {
    providedIn: 'root',
    factory: () => false
});
/**
 * @dynamic
 */
class LogService {
    constructor(isProductionEnv) {
        this.isProductionEnv = isProductionEnv;
    }
    _toConsole(message, type) {
        if (this.isProductionEnv) {
            switch (type) {
                case 'error':
                    console.error(message.message);
                    break;
                case 'warning':
                    console.warn(message);
                    break;
                default:
                    console.log(message);
                    break;
            }
        }
    }
    error(error) {
        this._toConsole(error, 'error');
    }
    warning(message) {
        this._toConsole(message, 'warning');
    }
    console(message) {
        this._toConsole(message, 'console');
    }
    static { this.ɵfac = function LogService_Factory(t) { return new (t || LogService)(i0.ɵɵinject(IS_PRODUCTION_ENV)); }; }
    static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: LogService, factory: LogService.ɵfac, providedIn: 'root' }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LogService, [{
        type: Injectable,
        args: [{
                providedIn: 'root'
            }]
    }], () => [{ type: undefined, decorators: [{
                type: Inject,
                args: [IS_PRODUCTION_ENV]
            }] }], null); })();

/**
 * Generated bundle index. Do not edit.
 */

export { IS_PRODUCTION_ENV, LogService };
//# sourceMappingURL=ironsource-fusion-ui-services-log.mjs.map
