/*!
 * KoliBri - The accessible HTML-Standard
 */
import{r as a,h as e,H as t}from"./index-a0b4dca2.js";import{t as s}from"./i18n-5fe08f1c.js";import{v as r}from"./image-source-a6af4847.js";import{v as i}from"./label-d70e7c34.js";import"./i18n-7ea9f137.js";import"./reuse-32931294.js";import"./prop.validators-c5e6ad2d.js";import"./index-541b643a.js";import"./dev.utils-fab45cbc.js";const c=a=>0===a.length?"":a[0].toUpperCase(),o=a=>{const e=a.split(/\s+/),t=e.at(0),s=e.at(-1);return e.length>=2&&t&&s?`${c(t)}${c(s)}`:c(a)},l=class{constructor(e){a(this,e),this._src=void 0,this._label=void 0,this.state={_src:"",_label:""}}render(){return e(t,{key:"bae5c6360b2eee7a2981083377c588892541ebd7",class:"kol-avatar-wc"},e("div",{key:"4ded87fb86a5cbe89329637817145fed01efcc1e","aria-label":s("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"},o(this.state._label.trim()))))}validateSrc(a){r(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{l as kol_avatar_wc};