/*!
 * KoliBri - The accessible HTML-Standard
 */
import{r as a,h as t,H as s}from"./index-b2c61df0.js";import{t as r}from"./i18n-112381e9.js";import{v as e}from"./image-source-d770a708.js";import{v as i}from"./label-20475610.js";import"./i18n-66b52d13.js";import"./reuse-b66836de.js";import"./prop.validators-db70e3c4.js";import"./index-db4aa6e4.js";import"./dev.utils-1ca991a2.js";const o=a=>0===a.length?"":a[0].toUpperCase(),c=a=>{const t=a.split(/\s+/),s=t.at(0),e=t.at(-1);return t.length>=2&&s&&e?`${o(s)}${o(e)}`:o(a)},d=class{constructor(t){a(this,t),this._src=void 0,this._label=void 0,this.state={_src:"",_label:""}}render(){return t(s,{key:"672b71c600e54214bbaf86210fe439af3f187c83",class:"kol-avatar-wc"},t("div",{key:"8631bb174ac54c1677149d12979f6837dddd692d","aria-label":r("kol-avatar-alt",{placeholders:{name:this.state._label}}),class:"container",role:"img"},this.state._src?t("img",{alt:"","aria-hidden":"true",class:"image",src:this.state._src}):t("span",{"aria-hidden":"true",class:"initials"},c(this.state._label.trim()))))}validateSrc(a){e(this,a)}validateLabel(a){i(this,a,{required:!0})}componentWillLoad(){this.validateSrc(this._src),this.validateLabel(this._label)}static get watchers(){return{_src:["validateSrc"],_label:["validateLabel"]}}};export{d as kol_avatar_wc};