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