import{d as u,A as d,K as s,J as t,_ as r,P as f,O as b,H as k,c as h,g as a}from"./index-DOFLUERq.js";import{_ as m}from"./_plugin-vue_export-helper-DlAUqK2U.js";const v={class:"field-label"},x={key:0,class:"required"},y={class:"checkbox-container"},g=["id","checked","disabled"],C={class:"checkbox-container"},q=["id","checked","disabled"],B={class:"field-label"},E={key:0,class:"required"},S=u({__name:"Check",props:{df:{},record:{},canEdit:{type:Boolean},ctx:{}},setup(e){const n=e,o=h(()=>n.df.label_layout||"vertical"),i=h(()=>`checkbox-${n.df.fieldname}-${Math.random().toString(36).substr(2,9)}`);return(O,c)=>(a(),d("div",{class:k(["field-wrapper",`layout-${o.value}`])},[o.value==="vertical"?(a(),d(s,{key:0},[t("div",v,[r(f(e.ctx.t(e.df.label||e.df.fieldname))+" ",1),e.df.reqd?(a(),d("span",x,"*")):b("",!0)]),t("div",y,[t("input",{id:i.value,type:"checkbox",checked:!!e.record[e.df.fieldname],onChange:c[0]||(c[0]=l=>{e.record[e.df.fieldname]=l.target.checked?1:0}),disabled:!e.canEdit,class:"native-checkbox"},null,40,g)])],64)):(a(),d(s,{key:1},[t("div",C,[t("input",{id:i.value,type:"checkbox",checked:!!e.record[e.df.fieldname],onChange:c[1]||(c[1]=l=>{e.record[e.df.fieldname]=l.target.checked?1:0}),disabled:!e.canEdit,class:"native-checkbox"},null,40,q)]),t("div",B,[r(f(e.ctx.t(e.df.label||e.df.fieldname))+" ",1),e.df.reqd?(a(),d("span",E,"*")):b("",!0)])],64))],2))}}),N=m(S,[["__scopeId","data-v-08df56b7"]]),j=Object.freeze(Object.defineProperty({__proto__:null,default:N},Symbol.toStringTag,{value:"Module"}));export{j as _};
