var h=Object.defineProperty,x=Object.defineProperties;var v=Object.getOwnPropertyDescriptors;var d=Object.getOwnPropertySymbols;var j=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable;var c=(t,e,a)=>e in t?h(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a,u=(t,e)=>{for(var a in e||(e={}))j.call(e,a)&&c(t,a,e[a]);if(d)for(var a of d(e))k.call(e,a)&&c(t,a,e[a]);return t},f=(t,e)=>x(t,v(e));import{j as i,_ as z}from"./main.2.8.10.js";import{u as I,b as m}from"./react-router.DMwpH23k.js";import{S as N}from"./StepPage.Dcszwd6s.js";import{S as _}from"./Steps.B84Ui3GU.js";import{I as w}from"./Integrations.BFhED4ck.js";import C from"./SelzyAuthorization.DgN1Bif7.js";import{n as F,e as L}from"./SelzyCommonFunc.BXJ1RhU4.js";import{S as E}from"./SelzyIntegLayout.nLK_tjUc.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:t,setFlow:e,flow:a,allIntegURL:g}){const y=I(),[o,p]=m.useState(1),[r,n]=m.useState({auth:!1,list:!1,tag:!1,page:!1}),[s,l]=m.useState({name:"Selzy",type:"Selzy",authKey:"",field_map:[{formFields:"",selzyFormField:""}],listIds:"",tags:"",method:"",option:"0",overwrite:"0",doubleOption:[{key:"0",name:"Invitation"},{key:"3",name:"Auto Subscribe"},{key:"4",name:"Update Subscribe"}],overwriteOption:[{key:"0",name:"Default"},{key:"1",name:"Field and Tag"},{key:"2",name:"Tag"}],actions:{},selzyFields:[{key:"email",label:"Email",required:!0},{key:"phone",label:"Phone Number",required:!1}]}),b=S=>{n(f(u({},r),{page:S}))};return i.jsxs("div",{children:[i.jsx("div",{className:"txt-center mt-2",children:i.jsx(_,{step:3,active:o})}),i.jsx(C,{selzyConf:s,setSelzyConf:l,loading:r,setLoading:n,step:o,setStep:p}),i.jsxs(N,{step:o,stepNo:2,style:{width:900,height:"auto",overflow:"visible"},children:[i.jsx(E,{selzyConf:s,setSelzyConf:l,formFields:t,loading:r,setLoading:n}),(s==null?void 0:s.listIds)&&i.jsxs("button",{onClick:()=>F(s,p,3),disabled:!s.listIds||s.field_map.length<1,className:"btn f-right btcd-btn-lg purple sh-sm flx",type:"button",children:[z("Next")," ",i.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),s.listIds&&i.jsx(w,{step:o,saveConfig:()=>L(a,e,g,s,y,b),isLoading:r.page,dataConf:s,setDataConf:l,formFields:t})]})}export{Z as default};
