var N=Object.defineProperty;var u=Object.getOwnPropertySymbols;var I=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;var b=(e,t,i)=>t in e?N(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,g=(e,t)=>{for(var i in t||(t={}))I.call(t,i)&&b(e,i,t[i]);if(u)for(var i of u(t))_.call(t,i)&&b(e,i,t[i]);return e};import{_ as n,j as a}from"./main.2.8.10.js";import{u as A,e as w,b as p}from"./react-router.DMwpH23k.js";import"./CopyIcn.BnhKHfEP.js";import{S as E}from"./SnackMsg.7BjcJK1j.js";import{S as F}from"./Steps.B84Ui3GU.js";import{I as q,s as L}from"./Integrations.BFhED4ck.js";import{h as T}from"./MailMintCommonFunc.CzGK4b_2.js";import D from"./MailMintAuthorization.BWbjbQmC.js";import{M as P}from"./MailMintIntegLayout.Zy7FcURX.js";import"./react-vendor.P7K3d6op.js";import"./Note.DalStCGz.js";import"./Table.DSsAy4VI.js";import"./index.DpWdl9V1.js";import"./BackIcn.BFDZx8No.js";import"./TutorialLink.D6K_DiHL.js";import"./TagifyInput.C4ilRm4k.js";import"./lodash.DCvQBX3r.js";function et({formFields:e,setFlow:t,flow:i,allIntegURL:d,isInfo:x,edit:M}){const h=A(),{formID:j}=w(),[o,r]=p.useState(!1),[m,f]=p.useState(1),[v,l]=p.useState({show:!1}),S=[{key:"1",label:n("Add contact","bit-integrations")}],k=[{key:"email",label:n("Email","bit-integrations"),required:!0},{key:"first_name",label:n("First Name","bit-integrations"),required:!1},{key:"last_name",label:n("Last Name","bit-integrations"),required:!1}],[s,c]=p.useState({name:"Mail Mint",type:"Mail Mint",mainAction:"",field_map:[{formField:"",mailMintFormField:""}],allActions:S,mailMintContactFields:k,actions:{}}),y=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),s.mainAction!==""&&f(3)};return a.jsxs("div",{children:[a.jsx(E,{snack:v,setSnackbar:l}),a.jsx("div",{className:"txt-center mt-2",children:a.jsx(F,{step:3,active:m})}),a.jsx(D,{formID:j,mailMintConf:s,setMailMintConf:c,step:m,setStep:f,isLoading:o,setIsLoading:r,setSnackbar:l}),a.jsxs("div",{className:"btcd-stp-page",style:g({},m===2&&{width:900,height:"auto",overflow:"visible"}),children:[a.jsx(P,{formFields:e,handleInput:C=>T(C,s,c,r),mailMintConf:s,setMailMintConf:c,isLoading:o,setIsLoading:r,setSnackbar:l,allIntegURL:d,isInfo:x,edit:M}),a.jsxs("button",{onClick:()=>y(),disabled:o,className:"btn f-right btcd-btn-lg purple sh-sm flx",type:"button",children:[n("Next","bit-integrations")," ",a.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),a.jsx(q,{step:m,saveConfig:()=>L({flow:i,setFlow:t,allIntegURL:d,navigate:h,conf:s,setIsLoading:r,setSnackbar:l}),isLoading:o,dataConf:s,setDataConf:c,formFields:e})]})}export{et as default};
