/*!
 * KoliBri - The accessible HTML-Standard
 */
import{r as registerInstance,h,H as Host}from"./index-b2c61df0.js";import{w as watchValidator,i as watchString}from"./prop.validators-db70e3c4.js";import{v as validateImageSource}from"./image-source-d770a708.js";import"./index-db4aa6e4.js";import"./dev.utils-1ca991a2.js";const loadingOptions=["eager","lazy"];function validateLoading(t,a){watchValidator(t,"_loading",(t=>"string"==typeof t&&loadingOptions.includes(t)),new Set(loadingOptions),a)}const defaultStyleCss="@layer kol-component {\n  :host {\n    display: inline-block;\n    font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n  }\n  img {\n    max-height: 100%;\n    max-width: 100%;\n  }\n}",KolImageDefaultStyle0=defaultStyleCss,KolImage=class{constructor(t){registerInstance(this,t),this._alt=void 0,this._loading="lazy",this._sizes=void 0,this._src=void 0,this._srcset=void 0,this.state={_alt:"",_loading:"lazy",_src:""}}validateAlt(t){watchString(this,"_alt",t,{required:!0})}validateLoading(t){validateLoading(this,t)}validateSizes(t){watchString(this,"_sizes",t)}validateSrc(t){validateImageSource(this,t,{required:!0})}validateSrcset(t){watchString(this,"_srcset",t)}componentWillLoad(){this.validateAlt(this._alt),this.validateLoading(this._loading),this.validateSizes(this._sizes),this.validateSrc(this._src),this.validateSrcset(this._srcset)}render(){return h(Host,{key:"eea8ad6a0b03687005b477fec030de58aa049891",class:"kol-image"},h("img",{key:"d00475bd0c8df6a965ae402879910a430231b4a1",alt:this.state._alt,loading:this.state._loading,sizes:this.state._sizes,src:this.state._src,srcset:this.state._srcset}))}static get watchers(){return{_alt:["validateAlt"],_loading:["validateLoading"],_sizes:["validateSizes"],_src:["validateSrc"],_srcset:["validateSrcset"]}}};KolImage.style={default:KolImageDefaultStyle0};export{KolImage as kol_image};