System.register(["./preload-helper-legacy.CIXZiioE.js","../apps/settings/index-legacy.Bb8z3cGQ.js","./LeadCaptureRecommended.vue_vue_type_style_index_0_lang-legacy.B-Q2ksgR.js"],function(e,l){"use strict";var a,t,i,n,u,o,d,v,r,s,c,f,p,y,_,g,h,b,m;return{setters:[e=>{a=e.d,t=e.ar,i=e.r,n=e.bn,u=e.bo,o=e.aa,d=e.by,v=e.bq,r=e.bu,s=e.bz,c=e.a9,f=e.h,p=e.bC,y=e.br,_=e.A},e=>{g=e.a,h=e.l,b=e._},e=>{m=e._}],execute:function(){e("_",a({__name:"DynamicComponents",props:{sectionParent:{type:String,required:!0},sectionChild:{type:String,required:!0},sectionKey:{type:String,required:!0}},emits:["fieldData"],setup(e,{emit:l}){const a=e,{sectionParent:D,sectionChild:C,sectionKey:k}=t(a),j=g.settings;let S=null;void 0!==j.controls[D.value][C.value]&&null!==j.controls[D.value][C.value]&&(S=j.controls[D.value][C.value][k.value]);const q=_(S),x=i({controls:q.value}),w=_([]),A=l,F=_([]);void 0!==q.value&&null!==q.value&&(x.controls=q.value.filter(e=>void 0!==e.hide?!e.hide&&(void 0!==w.value[e.id]&&(e.default=w.value[e.id]),!0):(void 0!==w.value[e.id]&&(e.default=w.value[e.id]),!0)));const I=e=>{Object.entries(e).forEach(([e,l])=>{w.value[e]=l}),A("fieldData",w.value)},K=e=>{let l="",a="";for(const[t,i]of Object.entries(e))l=t,a=i;x.controls=q.value.filter(e=>{if(void 0!==e.condition){const t=e.condition.find(e=>e.key===l);return("yes"===t.value&&"yes"===a||"no"===t.value&&"no"===a)&&(void 0!==w.value[e.id]&&(e.default=w.value[e.id]),!0)}return void 0!==w.value[e.id]&&(e.default=w.value[e.id]),!0}),F.value[l]=a,w.value[l]=a,A("fieldData",w.value)},O=e=>{x.controls=q.value.filter(e=>void 0!==e.hide&&null!==e.hide?!e.hide&&(void 0!==w.value[e.id]&&null!==w.value[e.id]&&(e.default=w.value[e.id]),!0):(void 0!==w.value[e.id]&&null!==w.value[e.id]&&(e.default=w.value[e.id]),!0))};return(e,l)=>(n(!0),u(o,null,d(x.controls,(e,l)=>(n(),u("div",{key:l},[(n(),v(p,null,{fallback:r(()=>[f(b)]),default:r(()=>[(n(),v(s(c(h)(e.type)),{params:e,"conditional-values":F.value,onInput:l=>((e,l)=>{const a=e;"checkbox"===l.type&&(a.target.value=a.target.checked),w.value[l.id]=a.target.value,A("fieldData",w.value)})(l,e),onFieldData:I,onConditionalData:K,onSelectedCondition:K,onFieldUpdatedData:O},null,40,["params","conditional-values","onInput"]))]),_:2},1024)),null!=e.show_lead_upgrade&&e.show_lead_upgrade?(n(),v(m,{key:0})):y("",!0)]))),128))}}))}}});
