import{_ as u,o as r,b as h,s as m,a,y as p,N as f,at as _,c as t,l,t as i,Q as k}from"./CmnEfQIC.js";import{_ as b}from"./WebFormFieldCore-xNTPdj0N.mjs";const v={extends:b,props:{value:{type:Boolean,default:!1}},methods:{validate(e){return this.required&&(!e||`${e}`.trim()==="")?{valid:!1,errors:["Field is required"]}:{valid:!0,errors:[]}}}},y={extends:v,props:{label:{type:String,default:null}},data(){return{checked:!1}},mounted(){this.checked=this.value}},C={class:"input"},g=["id","name","disabled"],B={key:0,class:"text-danger"},E=["for"],w={key:0,class:"error"};function q(e,s,n,F,d,N){const c=k;return r(),h(c,null,{default:m(()=>[a("div",{class:p(["checkbox-field",e.hasError&&e.showErrors?"has-error":""])},[a("div",C,[f(a("input",{id:e.name,"onUpdate:modelValue":s[0]||(s[0]=o=>d.checked=o),type:"checkbox",name:e.name,disabled:e.disabled,onChange:s[1]||(s[1]=o=>e.update(o.target.checked))},null,40,g),[[_,d.checked]]),e.required?(r(),t("div",B," * ")):l("",!0)]),a("div",null,[n.label?(r(),t("label",{key:0,for:e.name,class:"label"},i(n.label),9,E)):l("",!0)]),e.hasError&&e.showErrors?(r(),t("div",w,i(e.errorMsg),1)):l("",!0)],2)]),_:1})}const D=u(y,[["render",q],["__scopeId","data-v-c0495e68"]]);export{D as default};