import{r as l,h as e,H as c}from"./index-CJwtOLCA.js";import{t as n}from"./i18n-820d85c7-BH6ws-IX.js";import{v as o}from"./image-source-bd7ca7b4-CPfV1PhT.js";import{v as d}from"./label-51d66c9d-CT4N_dB0.js";/*!
 * KoliBri - The accessible HTML-Standard
 */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-DZ-MeeE6.js.map
