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.1.js";import{u as I,d as m}from"./react-router-dom.9mCuUg3q.js";import{S as N}from"./StepPage.B2uuvkiP.js";import{S as _}from"./Steps.1hz7v9Vj.js";import{I as w}from"./Integrations.D2bgBas2.js";import C from"./SelzyAuthorization.DCRcmSHa.js";import{n as F,e as L}from"./SelzyCommonFunc.BO1RenoT.js";import{S as E}from"./SelzyIntegLayout.-_HpH4Bh.js";import"./Note.BeM7sN-p.js";import"./CopyIcn.3gZpHton.js";import"./SnackMsg.S8DrwLlT.js";import"./Table.DAL7rcPQ.js";import"./index.wO-AxluA.js";import"./tutorialLinks.kMkIDzcD.js";import"./TutorialLink.BAFX--T3.js";import"./GlobalIntegrationHelper.CgnhJgll.js";import"./TagifyInput.Cu0YIRbG.js";import"./tagify.YxUZd8Ix.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}]}),S=b=>{n(f(u({},r),{page:b}))};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,S),isLoading:r.page,dataConf:s,setDataConf:l,formFields:t})]})}export{Z as default};
