import{r as l,h as e}from"./index-DscFWUNz.js";import{v as o}from"./image-source-RWPv7frZ-awO_r7fQ.js";import{v as c}from"./label-CdtNxOKu-DuSxxbJz.js";import{t as n}from"./i18n-CdSCDnmA-Bln0Fy0B.js";/*!
 * KoliBri - The accessible HTML-Standard
 */const r=a=>a.length===0?"":a[0].toUpperCase(),d=a=>{const t=a.split(/\s+/),s=t[0],i=t[t.length-1];return t.length>=2&&s&&i?`${r(s)}${r(i)}`:r(a)},b=class{constructor(a){l(this,a),this.state={_src:"",_label:""}}render(){return e("div",{key:"b9ad63a1fb9190d47524deae8e59a00d2a14fa83","aria-label":n("kol-avatar-alt",{placeholders:{name:this.state._label}}),class:"kol-avatar",role:"img"},this.state._src?e("img",{alt:"","aria-hidden":"true",class:"kol-avatar__image",src:this.state._src}):e("span",{"aria-hidden":"true",class:"kol-avatar__initials"},d(this.state._label.trim())))}validateSrc(a){o(this,a)}validateLabel(a){c(this,a,{required:!0})}componentWillLoad(){this.validateSrc(this._src),this.validateLabel(this._label)}static get watchers(){return{_src:["validateSrc"],_label:["validateLabel"]}}};export{b as kol_avatar_wc};
//# sourceMappingURL=kol-avatar-wc.entry-BJwQ_ZJG.js.map
