"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[7362],{3393(e,t,s){s.d(t,{y:()=>a});var n=s(9696),i=s(79365),c=s(81365);const a=(...e)=>(0,n.Zz)(i.XX,i._$,i.yF,i.jd)((0,c.q)(...e))},41813(e,t,s){s.d(t,{A:()=>h,T:()=>c});var n=s(3393),i=s(97810);const c=(0,i.xE)("boolean-field-internal"),a=["disabled","invalid","readonly"],l=(0,n.y)({componentName:c,baseSelector:"div"}),h=class extends l{static get observedAttributes(){return["readonly","label"]}constructor(){super(),this.innerHTML='\n\t\t\t<div class="wrapper">\n\t\t\t\t<vaadin-checkbox>\n\t\t\t\t\t<descope-enriched-text link-target-blank="true" class="label-content" slot="label"></descope-enriched-text>\n\t\t\t\t</vaadin-checkbox>\n\t\t\t</div>\n\t\t',this.wrapperEle=this.querySelector("div"),this.checkbox=this.querySelector("vaadin-checkbox"),this.labelContent=this.querySelector(".label-content")}get value(){return this.checkbox?.checked}set value(e){this.checkbox.checked=e}get checked(){return this.value}set checked(e){this.value=e}init(){this.addEventListener("focus",e=>{e.isTrusted&&this.checkbox.focus()}),super.init?.(),(0,i.EA)(this,this.checkbox,{includeAttrs:a}),(0,i.Gh)(this,this.checkbox,{includeAttrs:["checked"]}),this.labelContent.addEventListener("click",e=>{this.hasAttribute("disabled")||this.hasAttribute("readonly")||this.checkbox.click()}),this.handleFocusEventsDispatching([this.checkbox])}attributeChangedCallback(e,t,s){super.attributeChangedCallback?.(e,t,s),"readonly"===e&&this.onReadOnlyChange(null!==s),"label"===e&&this.onLabelChange()}onLabelChange(){const e=this.getAttribute("label");this.labelContent.textContent=e||""}onReadOnlyChange(e){this.baseElement.setAttribute("inert",e)}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:{}}}},3274(e,t,s){s.r(t);var n=s(41813);customElements.define(n.T,n.A)}}]);
//# sourceMappingURL=boolean-fields-descope-boolean-field-internal-index-js.js.map