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.8.10.js";import{u as N,b as p}from"./react-router.DMwpH23k.js";import{S as _}from"./StepPage.Dcszwd6s.js";import{S as C}from"./Steps.B84Ui3GU.js";import{I as L}from"./Integrations.BFhED4ck.js";import w from"./MailercloudAuthorization.CFN-AsSS.js";import{n as k,d as E}from"./MailercloudCommonFunc.BCv3ecKj.js";import{M as F}from"./MailercloudIntegLayout.CyZmSgRC.js";import"./react-vendor.P7K3d6op.js";import"./Note.DalStCGz.js";import"./CopyIcn.BnhKHfEP.js";import"./SnackMsg.7BjcJK1j.js";import"./Table.DSsAy4VI.js";import"./index.DpWdl9V1.js";import"./TutorialLink.D6K_DiHL.js";import"./GlobalIntegrationHelper.Belqr4OT.js";import"./TagifyInput.C4ilRm4k.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};
