{"version":3,"file":"ironsource-fusion-ui-services-log.mjs","sources":["../../../projects/fusion-ui/services/log/log.service.ts","../../../projects/fusion-ui/services/log/ironsource-fusion-ui-services-log.ts"],"sourcesContent":["import {Inject, Injectable, InjectionToken} from '@angular/core';\n\nexport const IS_PRODUCTION_ENV = new InjectionToken<boolean>('Is Production Environment', {\n    providedIn: 'root',\n    factory: () => false\n});\n\n/**\n * @dynamic\n */\n@Injectable({\n    providedIn: 'root'\n})\nexport class LogService {\n    constructor(@Inject(IS_PRODUCTION_ENV) private isProductionEnv: boolean) {}\n\n    private _toConsole(message: string | Error, type) {\n        if (this.isProductionEnv) {\n            switch (type) {\n                case 'error':\n                    console.error((message as Error).message);\n                    break;\n                case 'warning':\n                    console.warn(message);\n                    break;\n                default:\n                    console.log(message);\n                    break;\n            }\n        }\n    }\n\n    public error(error: Error) {\n        this._toConsole(error, 'error');\n    }\n\n    public warning(message) {\n        this._toConsole(message, 'warning');\n    }\n\n    public console(message) {\n        this._toConsole(message, 'console');\n    }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAEa,iBAAiB,GAAG,IAAI,cAAc,CAAU,2BAA2B,EAAE;AACtF,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,MAAM,KAAK;AACvB,CAAA,EAAE;AAEH;;AAEG;MAIU,UAAU,CAAA;AACnB,IAAA,WAAA,CAA+C,eAAwB,EAAA;QAAxB,IAAe,CAAA,eAAA,GAAf,eAAe,CAAS;KAAI;IAEnE,UAAU,CAAC,OAAuB,EAAE,IAAI,EAAA;QAC5C,IAAI,IAAI,CAAC,eAAe,EAAE;AACtB,YAAA,QAAQ,IAAI;AACR,gBAAA,KAAK,OAAO;AACR,oBAAA,OAAO,CAAC,KAAK,CAAE,OAAiB,CAAC,OAAO,CAAC,CAAC;oBAC1C,MAAM;AACV,gBAAA,KAAK,SAAS;AACV,oBAAA,OAAO,CAAC,IAAI,CAAC,OAAO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