System.register(["./preload-helper-legacy.CIXZiioE.js","../apps/settings/index-legacy.Bb8z3cGQ.js","./index-legacy.BA7qrnNr.js","./index-legacy.BdtHwh4o.js","./index-legacy.fuZ4twhd.js","./index-legacy.CKw89bRG.js"],function(e,a){"use strict";var l,u,t,n,d,v,i,c,r,p,o,s,h,y,k,f,b,g,U,m,x;return{setters:[e=>{l=e.d,u=e.ar,t=e.A,n=e.r,d=e.bn,v=e.bo,i=e.a9,c=e.bq,r=e.br,p=e.bu,o=e.aa,s=e.by,h=e.bp},e=>{y=e.f,k=e.p},e=>{f=e.I,b=e.A},e=>{g=e.j,U=e.S},e=>{m=e.A},e=>{x=e.A}],execute:function(){const a=["innerHTML"],D=["innerHTML"];e("_",l({__name:"GroupEditFields",props:{editableData:{type:Object,required:!0},fieldValue:{type:[String,Number,Array,Object,Boolean],required:!0},fieldData:{type:Object,required:!0}},emits:["fieldUpdatedData"],setup(e,{emit:l}){var j;const _=e,{editableData:w,fieldValue:A,fieldData:C}=u(_),I=l,M=C.value,q=t(null!==(j=M.type)&&void 0!==j?j:"").value,H=y(q,A.value),L=t(H),T=t("select"===q?M.options:[]),O=t([]),S=n({check:"yes"===L.value}),E=t("switch"===q?M.options.yes:""),V=t("switch"===q?M.options.no:"");"select"===q&&M.multiple&&(L.value=null==w?void 0:w.value[M.id]);const B=()=>{O.value[M.id]=L.value,I("fieldUpdatedData",O.value)},F=()=>{O.value[M.id]=Math.abs(L.value),I("fieldUpdatedData",O.value)},G=()=>{O.value[M.id]=L.value+"%",I("fieldUpdatedData",O.value)},N=e=>{L.value=e;let a=T.value[e];Array.isArray(e)&&(a=e.map(e=>T.value[e])),O.value[M.id]=L.value,void 0!==M.label_id&&null!==M.label_id&&(O.value[M.label_id]=a),I("fieldUpdatedData",O.value)};return(e,l)=>(d(),v(o,null,["text"===i(q)||"email"===i(q)?(d(),c(i(f),{key:0,value:L.value,"onUpdate:value":l[0]||(l[0]=e=>L.value=e),onInput:B},null,8,["value"])):r("",!0),"checkbox"===i(q)?(d(),c(i(f),{key:1,value:L.value,"onUpdate:value":l[1]||(l[1]=e=>L.value=e),onInput:l[2]||(l[2]=e=>{return a=e,O.value[M.id]=a.target.value,void I("fieldUpdatedData",O.value);var a})},null,8,["value"])):r("",!0),"number"===i(q)?(d(),c(i(x),{key:2,value:L.value,"onUpdate:value":l[3]||(l[3]=e=>L.value=e),onInput:F,onChange:F},null,8,["value"])):r("",!0),"percent"===i(q)?(d(),c(i(x),{key:3,value:L.value,"onUpdate:value":l[4]||(l[4]=e=>L.value=e),onInput:G,onChange:G},null,8,["value"])):r("",!0),"textarea"===i(q)?(d(),c(i(b),{key:4,value:L.value,"onUpdate:value":l[5]||(l[5]=e=>L.value=e),rows:4},null,8,["value"])):r("",!0),"select"===i(q)&&i(M).multiple?(d(),c(i(U),{key:5,ref:"select",value:L.value,"onUpdate:value":l[6]||(l[6]=e=>L.value=e),mode:"multiple",style:{"max-width":"320px",width:"100%"},onChange:N},{default:p(()=>[(d(!0),v(o,null,s(T.value,(e,l)=>(d(),c(i(g),{key:l,value:l},{default:p(()=>[h("span",{innerHTML:i(k)(e)},null,8,a)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])):"select"===i(q)?(d(),c(i(U),{key:6,ref:"select",value:L.value,"onUpdate:value":l[7]||(l[7]=e=>L.value=e),style:{"max-width":"320px",width:"100%"},onChange:N},{default:p(()=>[(d(!0),v(o,null,s(T.value,(e,a)=>(d(),c(i(g),{key:a,value:a},{default:p(()=>[h("span",{innerHTML:i(k)(e)},null,8,D)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])):r("",!0),"switch"===i(q)?(d(),c(i(m),{key:7,checked:S.check,"onUpdate:checked":l[8]||(l[8]=e=>S.check=e),"checked-children":E.value,"un-checked-children":V.value,onChange:l[9]||(l[9]=e=>{return a=e,L.value=a?"yes":"no",O.value[M.id]=L.value,S.check=a,void I("fieldUpdatedData",O.value);var a})},null,8,["checked","checked-children","un-checked-children"])):r("",!0)],64))}}))}}});
