'use strict';
import { getLogDto } from './log-dtos.js';
import { logSeverities } from '../../../fd-toolbox-core/enums/log-severities.js';
import { addLog } from './latest-logs-store.js';
import { isProdOrDemo } from '../../lib/environments.js';

var __defProp=Object['defineProperty'],__name=(_0x729467,_0x2f111b)=>__defProp(_0x729467,'name',{'value':_0x2f111b,'configurable':!![]});function logInfo(_0x439f7c){log(getLogDto(_0x439f7c,logSeverities['info']));}__name(logInfo,'logInfo');function logDebug(_0x3dbeb9){log(getLogDto(_0x3dbeb9,logSeverities['debug']));}__name(logDebug,'logDebug');function logWarning(_0x19f849){log(getLogDto(_0x19f849,logSeverities['warning']));}__name(logWarning,'logWarning');function logError(_0x49e1af,_0x122fd6){log(getLogDto(_0x49e1af,logSeverities['error'],_0x122fd6),_0x122fd6);}__name(logError,'logError');function logNextJsMessage(_0x17020d,_0x5ded30,_0x4b9c48){if(isProdOrDemo())log(getLogDto({'method':_0x17020d,'url':_0x5ded30,'status':_0x4b9c48},logSeverities['info']));}__name(logNextJsMessage,'logNextJsMessage');function log(_0xc0d943,_0x5a18c5){addLog(_0xc0d943);const _0x24ef7f=JSON['stringify'](_0xc0d943);switch(_0xc0d943['severity']){case logSeverities['warning']:console['warn'](_0x24ef7f);break;case logSeverities['error']:console['error'](_0x5a18c5??'',_0x24ef7f);break;case logSeverities['debug']:console['debug'](_0x24ef7f);break;case logSeverities['info']:console['info'](_0x24ef7f);break;default:}}__name(log,'log');

export { log, logDebug, logError, logInfo, logNextJsMessage, logWarning };
