/*!
 * KoliBri - The accessible HTML-Standard
 */
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-5cf289dd.js"),prop_validators=require("./prop.validators-476ef807.js"),imageSource=require("./image-source-d836d9d6.js");require("./index-1285d2d1.js"),require("./dev.utils-3e595d38.js");const loadingOptions=["eager","lazy"];function validateLoading(t,e){prop_validators.watchValidator(t,"_loading",(t=>"string"==typeof t&&loadingOptions.includes(t)),new Set(loadingOptions),e)}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){index.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){prop_validators.watchString(this,"_alt",t,{required:!0})}validateLoading(t){validateLoading(this,t)}validateSizes(t){prop_validators.watchString(this,"_sizes",t)}validateSrc(t){imageSource.validateImageSource(this,t,{required:!0})}validateSrcset(t){prop_validators.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 index.h(index.Host,{key:"eea8ad6a0b03687005b477fec030de58aa049891",class:"kol-image"},index.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},exports.kol_image=KolImage;