import{r as l,h as e,H as c}from"./index-BeCeuELg.js";import{t as n}from"./i18n-43b7aa72-DSS4ELtF.js";import{v as o}from"./image-source-920b751b-CATffHuo.js";import{v as d}from"./label-3757689e-D7ErDa5R.js";const s=a=>a.length===0?"":a[0].toUpperCase(),h=a=>{const t=a.split(/\s+/),r=t[0],i=t[t.length-1];return t.length>=2&&r&&i?`${s(r)}${s(i)}`:s(a)},u=class{constructor(a){l(this,a),this._src=void 0,this._label=void 0,this.state={_src:"",_label:""}}render(){return e(c,{key:"b45a03c214f69fa12120c1ab077cbdda68af4d03",class:"kol-avatar-wc"},e("div",{key:"11c5ec00e290a3e045ec6d355bd9afd9b65cb396","aria-label":n("kol-avatar-alt",{placeholders:{name:this.state._label}}),class:"container",role:"img"},this.state._src?e("img",{alt:"","aria-hidden":"true",class:"image",src:this.state._src}):e("span",{"aria-hidden":"true",class:"initials"},h(this.state._label.trim()))))}validateSrc(a){o(this,a)}validateLabel(a){d(this,a,{required:!0})}componentWillLoad(){this.validateSrc(this._src),this.validateLabel(this._label)}static get watchers(){return{_src:["validateSrc"],_label:["validateLabel"]}}};export{u as kol_avatar_wc};
//# sourceMappingURL=kol-avatar-wc.entry-D0Dj34QD.js.map
