/*!
 * KoliBri - The accessible HTML-Standard
 */
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-277fc2a7.js"),prop_validators=require("./prop.validators-9c1f1dbd.js"),imageSource=require("./image-source-c6b8c632.js");require("./index-6912b26b.js"),require("./dev.utils-58fde089.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:"35060e13dba448cc0f1a193663308482db063a03",class:"kol-image"},index.h("img",{key:"27dd05459ce46a822b26e9221bb4fd62e9434359",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;