import{Aa as c,Gd as h,o as l,p as d,sa as g,za as p}from"./chunk-JSJB5BKT.js";import{e as a}from"./chunk-SZAW6ZBW.js";var e,u=a(()=>{e=function(t){return t[t.log=0]="log",t[t.warning=1]="warning",t[t.error=2]="error",t}(e||{})});var f,n,G=a(()=>{d();h();u();h();f=(()=>{class t{log(o,s){}warn(o,s){}error(o,s){}printGroup(o,s){}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275prov=g({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),n=class extends f{constructor(){super(),this.groupList=[],this.buildLogFactory()}log(r,o){this.logMessage(r,e.log,o)}warn(r,o){this.logMessage(r,e.warning,o)}error(r,o){this.logMessage(r,e.error,o)}printGroup(r,o){r=r||this.lastGroupName;let s=this.findGroup(r);s&&(console.group(o),s.messages.forEach(i=>{this.printMessage(i.message,i.type)}),console.groupEnd(),this.groupList.splice(this.groupList.findIndex(i=>i.label===r)))}logMessage(r,o=e.log,s){s?(this.lastGroupName=s,this.addMessageToGroup(r,s,o)):this.printMessage(r,o)}printMessage(r,o=e.log){this.logFactory[o](r)}addMessageToGroup(r,o,s=e.log){o=o||this.lastGroupName;let i=this.findGroup(o);i=i||{label:o,messages:[]},i.messages.push({message:r,type:s}),this.groupList.push(i)}findGroup(r){return this.groupList.find(o=>o.label===r)}buildLogFactory(){this.logFactory={},this.logFactory[e.log]=r=>{console.log(r)},this.logFactory[e.error]=r=>{console.error(r)},this.logFactory[e.warning]=r=>{console.warn(r)}}};l([p("environment"),c()],n.prototype,"environment",void 0)});export{f as a,n as b,G as c};
