var v=Object.defineProperty,j=Object.defineProperties;var S=Object.getOwnPropertyDescriptors;var p=Object.getOwnPropertySymbols;var M=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable;var c=(t,e,s)=>e in t?v(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,f=(t,e)=>{for(var s in e||(e={}))M.call(e,s)&&c(t,s,e[s]);if(p)for(var s of p(e))y.call(e,s)&&c(t,s,e[s]);return t},u=(t,e)=>j(t,S(e));import{u as N,r as d,j as o}from"./main-406.js";import{_,I as k}from"./bi.394.85.js";import{S as C}from"./bi.395.940.js";import{S as E}from"./bi.68.941.js";import I from"./bi.21.283.js";import{n as L,c as q}from"./bi.567.825.js";import{M as w}from"./bi.319.826.js";import"./bi.150.760.js";import"./bi.968.816.js";import"./bi.704.707.js";import"./bi.701.708.js";function O({formFields:t,setFlow:e,flow:s,allIntegURL:g}){const h=N(),[i,m]=d.useState(1),[n,r]=d.useState({auth:!1,list:!1,page:!1}),[a,l]=d.useState({name:"Moosend",type:"Moosend",authKey:"",field_map:[{formFields:"",moosendFormFields:""}],listId:"",method:"",actions:{},moosendFields:[{key:"Email",label:"Email",required:!0},{key:"Name",label:"Name",required:!1},{key:"Mobile",label:"Mobile",required:!1}]}),x=b=>{r(u(f({},n),{page:b}))};return o.jsxs("div",{children:[o.jsx("div",{className:"txt-center mt-2",children:o.jsx(E,{step:3,active:i})}),o.jsx(I,{moosendConf:a,setMoosendConf:l,loading:n,setLoading:r,step:i,setStep:m}),o.jsxs(C,{step:i,stepNo:2,style:{width:900,height:"auto",overflow:"visible"},children:[o.jsx(w,{moosendConf:a,setMoosendConf:l,formFields:t,loading:n,setLoading:r}),(a==null?void 0:a.method)&&o.jsxs("button",{onClick:()=>L(a,m,3),disabled:a.field_map.length<1,className:"btn f-right btcd-btn-lg purple sh-sm flx",type:"button",children:[_("Next")," ",o.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),a.method&&o.jsx(k,{step:i,saveConfig:()=>q(s,e,g,a,h,x),isLoading:n.page,dataConf:a,setDataConf:l,formFields:t})]})}export{O as default};
