var b=Object.defineProperty,j=Object.defineProperties;var S=Object.getOwnPropertyDescriptors;var d=Object.getOwnPropertySymbols;var I=Object.prototype.hasOwnProperty,M=Object.prototype.propertyIsEnumerable;var c=(e,t,s)=>t in e?b(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,u=(e,t)=>{for(var s in t||(t={}))I.call(t,s)&&c(e,s,t[s]);if(d)for(var s of d(t))M.call(t,s)&&c(e,s,t[s]);return e},f=(e,t)=>j(e,S(t));import{j as i,_ as y}from"./main.2.9.0.js";import{u as N,b as p}from"./react-router.DMwpH23k.js";import{S as _}from"./StepPage.6Rz8L_er.js";import{S as C}from"./Steps.BYe8zHkm.js";import{I as L}from"./Integrations.DL8wqGct.js";import w from"./MailercloudAuthorization.CVtG9OEQ.js";import{n as k,d as E}from"./MailercloudCommonFunc.ANcnglg1.js";import{M as F}from"./MailercloudIntegLayout.u_LtjDlw.js";import"./react-vendor.P7K3d6op.js";import"./Note.NSUdvR3c.js";import"./CopyIcn.CEA_lFLo.js";import"./SnackMsg.DYSD96P4.js";import"./Table.BfF8RYFZ.js";import"./index.DpWdl9V1.js";import"./TutorialLink.CFG7bS5c.js";import"./GlobalIntegrationHelper.B6YI8w_n.js";import"./TagifyInput.KPPRQJ1B.js";import"./lodash.DCvQBX3r.js";function Z({formFields:e,setFlow:t,flow:s,allIntegURL:g}){const x=N(),[o,m]=p.useState(1),[r,l]=p.useState({auth:!1,list:!1,page:!1}),[a,n]=p.useState({name:"Mailercloud",type:"Mailercloud",authKey:"",field_map:[{formFields:"",mailercloudFormField:""}],listId:"",contactType:"",actions:{}}),h=v=>{l(f(u({},r),{page:v}))};return i.jsxs("div",{children:[i.jsx("div",{className:"txt-center mt-2",children:i.jsx(C,{step:3,active:o})}),i.jsx(w,{mailercloudConf:a,setMailercloudConf:n,loading:r,setLoading:l,step:o,setStep:m}),i.jsxs(_,{step:o,stepNo:2,style:{width:900,height:"auto",overflow:"visible"},children:[i.jsx(F,{mailercloudConf:a,setMailercloudConf:n,formFields:e,loading:r,setLoading:l}),(a==null?void 0:a.listId)&&i.jsxs("button",{onClick:()=>k(a,m,3),disabled:!a.listId||a.field_map.length<1,className:"btn f-right btcd-btn-lg purple sh-sm flx",type:"button",children:[y("Next")," ",i.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),a.listId&&i.jsx(L,{step:o,saveConfig:()=>E(s,t,g,a,x,h),isLoading:r.page,dataConf:a,setDataConf:n,formFields:e})]})}export{Z as default};
