System.register(["../../../../common/preload-helper-legacy.CIXZiioE.js","../../index-legacy.Bb8z3cGQ.js","../../../../common/GroupControl.vue_vue_type_style_index_0_scoped_ac0e52be_lang-legacy.BhDSN6Mf.js","../../../../common/DnDDataTableControl.vue_vue_type_style_index_0_scoped_0b913e4f_lang-legacy.D1tDIuyM.js","../../../../common/GroupConditionalControl.vue_vue_type_style_index_0_scoped_96558d5e_lang-legacy.CHJO3hx-.js","../../../../common/LabelControl.vue_vue_type_script_setup_true_lang-legacy.9mLv6sKk.js","../../../../common/OptionsControl.vue_vue_type_style_index_0_scoped_a595eea6_lang-legacy.BOGbhEW3.js","../../../../common/index-legacy.fuZ4twhd.js","../../../../common/index-legacy.CO4MsCT9.js","../../../../common/motion-legacy.C4TziduP.js","../../../../common/KeyCode-legacy.Cey0FNFJ.js","../../../../common/index-legacy.M32zB8dq.js","../../../../common/useState-legacy.C_VuFIfe.js","../../../../common/FormItemContext-legacy.CWXRIB7M.js","../../../../common/createContext-legacy.DxkS4L9s.js"],function(e,l){"use strict";var n,o,a,c,t,u,i,s,d,r,_,m,p;return{setters:[e=>{n=e.d,o=e.ar,a=e.A,c=e.r,t=e.bn,u=e.bo,i=e.bp,s=e.h,d=e.a9,r=e.br},e=>{_=e.p},null,null,null,e=>{m=e._},null,e=>{p=e.A},null,null,null,null,null,null,null],execute:function(){const l={class:"wwp-row-handle"},v={class:"wwp-left-content"},y={class:"wwp-right-content"},g=["innerHTML"];e("default",n({__name:"SwitchControl",props:{params:{type:Object,required:!0},conditionalValues:{type:Object,required:!1,default:()=>({})}},emits:["conditionalData","fieldData"],setup(e,{emit:n}){const h=e,j=n,{params:k,conditionalValues:b}=o(h),f=k.value,x=a(b.value[f.id]?b.value[f.id]:f.default),C=c({check:"yes"===x.value}),w=a(f.options.yes),D=a(f.options.no),q=a([]);return x.value&&(q.value[f.id]=x.value,j("fieldData",q.value)),(e,n)=>{var o,a;return t(),u("div",l,[i("div",v,[s(d(m),{params:d(f)},null,8,["params"])]),i("div",y,[s(d(p),{checked:C.check,"onUpdate:checked":n[0]||(n[0]=e=>C.check=e),"checked-children":w.value,"un-checked-children":D.value,onChange:n[1]||(n[1]=e=>{return l=e,x.value=l?"yes":"no",q.value[f.id]=x.value,C.check=l,j("conditionalData",q.value),void j("fieldData",q.value);var l})},null,8,["checked","checked-children","un-checked-children"]),"undefined"!==d(f).description?(t(),u("p",{key:0,innerHTML:d(_)(null!==(o=null===(a=d(f))||void 0===a?void 0:a.description)&&void 0!==o?o:"")},null,8,g)):r("",!0)])])}}}))}}});
