System.register(["../../../../common/index-legacy.DRKniymH.js","../../../../common/PresetControl.vue_vue_type_style_index_0_scoped_c9e2dd9e_lang-legacy.CBGxOGwC.js","../../../../common/Preview.vue_vue_type_style_index_0_scoped_e226939c_lang-legacy.Ceu-Swp9.js","../../../../common/Confirmation.vue_vue_type_script_setup_true_lang-legacy.CIhxBO6H.js","../../../../common/LabelControl.vue_vue_type_script_setup_true_lang-legacy.DL25Ke3f.js","../../../../common/transition-legacy.DZbCmrRe.js","../../../../common/keyboard-legacy.ItkZdbDJ.js","../../../../common/open-closed-legacy.CWZrlJ6W.js","../../../../common/micro-task-legacy.D9KKWy-6.js"],(function(t,e){"use strict";var l,s,i,n,a,w,o,c,u,r,d,m,_,p;return{setters:[t=>{l=t.d,s=t.t,i=t.r,n=t.n,a=t.o,w=t.c,o=t.b,c=t.e,u=t.u,r=t.Q,d=t.g,m=t.H,_=t.a},null,null,null,t=>{p=t._},null,null,null,null],execute:function(){const e={class:"stwlite-tw-flex stwlite-tw-items-center stwlite-tw-justify-between"},y=["innerHTML"],v={class:"stwlite-tw-flex stwlite-tw-items-center"},b=["id"],g=["id"];t("default",l({__name:"SwitchControl",props:{params:{type:Object,required:!0},conditionalValues:{type:Object,required:!1,default:()=>({})}},emits:["conditionalData"],setup(t,{emit:l}){const f=t,x=l,{params:j,conditionalValues:k}=s(f),h=j.value,C=i(k.value[h.id]?k.value[h.id]:h.default),H=n({check:"yes"===C.value}),L=i(h.options.yes),S=i(h.options.no),T=i([]);return(t,l)=>(a(),w("div",e,[o("div",null,[c(u(p),{params:u(h)},null,8,["params"]),"undefined"!==u(h).description?(a(),w("p",{key:0,class:"stwlite-tw-text-sm stwlite-tw-text-gray-600 stwlite-tw-mt-1",innerHTML:u(r)(u(h)?.description??"")},null,8,y)):d("",!0)]),o("div",v,[o("button",{type:"button",id:`${u(h).id}-btn`,onClick:l[0]||(l[0]=t=>{return e=!H.check,C.value=e?"yes":"no",T.value[h.id]=C.value,H.check=e,void x("conditionalData",T.value);var e}),class:m(["stwlite-tw-relative stwlite-tw-inline-flex stwlite-tw-h-6 stwlite-tw-w-11 stwlite-tw-items-center stwlite-tw-rounded-full stwlite-tw-transition-colors stwlite-tw-border-0",H.check?"stwlite-tw-bg-blue-600 stwlite-selected-btn-field":"stwlite-tw-bg-gray-200"])},[o("span",{class:m(["stwlite-tw-inline-block stwlite-tw-h-4 stwlite-tw-w-4 stwlite-tw-transform stwlite-tw-rounded-full stwlite-tw-bg-white stwlite-tw-transition-transform",H.check?"stwlite-tw-translate-x-4 stwlite-selected-label-field":"stwlite-tw-translate-x-0"])},null,2)],10,b),o("span",{id:`${u(h).id}-label`,class:"stwlite-tw-ml-2 stwlite-tw-text-sm stwlite-tw-font-medium stwlite-tw-text-blue-600"},_(H.check?L.value:S.value),9,g)])]))}}))}}}));
