var j=Object.defineProperty;var l=Object.getOwnPropertySymbols;var v=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;var f=(e,t,s)=>t in e?j(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,x=(e,t)=>{for(var s in t||(t={}))v.call(t,s)&&f(e,s,t[s]);if(l)for(var s of l(t))_.call(t,s)&&f(e,s,t[s]);return e};import{j as o,_ as I}from"./main.2.8.1.js";import{u as C,h as k,d}from"./react-router-dom.9mCuUg3q.js";import"./Note.BeM7sN-p.js";import{S as N}from"./SnackMsg.S8DrwLlT.js";import{S as w}from"./Steps.1hz7v9Vj.js";import{I as y,s as L}from"./Integrations.D2bgBas2.js";import D from"./SendFoxAuthorization.CT9gk1Ae.js";import{h as E,i as T}from"./SendFoxCommonFunc.DYCIjzPK.js";import{S as A}from"./SendFoxIntegLayout.8Em0bY0f.js";import"./CopyIcn.3gZpHton.js";import"./Table.DAL7rcPQ.js";import"./index.wO-AxluA.js";import"./BackIcn._kGL_vVw.js";import"./tutorialLinks.kMkIDzcD.js";import"./TutorialLink.BAFX--T3.js";import"./TagifyInput.Cu0YIRbG.js";import"./tagify.YxUZd8Ix.js";function $({formFields:e,setFlow:t,flow:s,allIntegURL:u}){const b=C(),{formID:F}=k(),[c,n]=d.useState(!1),[a,p]=d.useState(1),[S,r]=d.useState({show:!1}),[i,m]=d.useState({name:"SendFox",type:"SendFox",listId:"",access_token:"",field_map:[{formField:"",sendFoxFormField:""}],field_map_list:[{formField:"",sendFoxListFormField:""}],field_map_unsubscribe:[{formField:"",sendFoxUnsubscribeFormField:""}],actions:{}}),g=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),p(3)};return o.jsxs("div",{children:[o.jsx(N,{snack:S,setSnackbar:r}),o.jsx("div",{className:"txt-center mt-2",children:o.jsx(w,{step:3,active:a})}),o.jsx(D,{formID:F,sendFoxConf:i,setSendFoxConf:m,step:a,setstep:p,isLoading:c,setIsLoading:n,setSnackbar:r}),o.jsxs("div",{className:"btcd-stp-page",style:x({},a===2&&{width:900,height:"auto",overflow:"visible"}),children:[o.jsx(A,{formFields:e,handleInput:h=>E(h,i,m,n),sendFoxConf:i,setSendFoxConf:m,isLoading:c,setIsLoading:n,setSnackbar:r}),o.jsxs("button",{onClick:()=>g(),className:"btn f-right btcd-btn-lg purple sh-sm flx",type:"button",disabled:T(i),children:[I("Next","bit-integrations"),"  ",o.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),o.jsx(y,{step:a,saveConfig:()=>L({flow:s,setFlow:t,allIntegURL:u,navigate:b,conf:i,setIsLoading:n,setSnackbar:r}),isLoading:c,dataConf:i,setDataConf:m,formFields:e})]})}export{$ as default};
