import{b as n}from"./p-e680e7e4.js";const e={components:[],event:!1,lifecycle:!1,render:!1,custom:!1};function t(t="unknown"){return function(c){const{connectedCallback:o,disconnectedCallback:i,render:s,componentDidLoad:r,createLogger:d}=c,l=(t=>{const c=(c,o,...i)=>{const s=(()=>{let t=e;return n.hasWindow&&window.BaloiseDesignSystem&&window.BaloiseDesignSystem.config&&window.BaloiseDesignSystem.config.logger&&(t=window.BaloiseDesignSystem.config.logger),t})();s.components.includes(t)&&s[c]&&console.log(o,...i)};return{custom:(n,...e)=>c("custom",` ➡️ [${t}] - ${n}`,...e),lifecycle:(n,...e)=>c("lifecycle",`${"connectedCallback"===n?"🟢":"disconnectedCallback"===n?"🔴":"componentDidLoad"===n?"🏁":" ➡️"} [${t}] - (${n})`,...e),event:(n,...e)=>c("event",`🔥 [${t}] - (${n})`,...e),render:(...n)=>c("render",`🖌️ [${t}] - (render)`,...n)}})(t);c.connectedCallback=function(){l.lifecycle("connectedCallback",this);const n=Object.keys(this).filter((n=>n.startsWith("bal"))).filter((n=>"object"==typeof this[n]));for(let e=0;e<n.length;e++){const t=n[e],c=this[t];this[t]={emit:(...n)=>(l.event(t,this,...n),c.emit.call(this,...n))}}return d.call(this,l.custom),o&&o.call(this)},c.disconnectedCallback=function(){return l.lifecycle("disconnectedCallback",this),i&&i.call(this)},c.componentDidLoad=function(){return l.lifecycle("componentDidLoad",this),r&&r.call(this)},c.render=function(){return l.render(this),s.call(this)}}}export{t as L,e as d}