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.10.js";import{u as C,e as k,b as d}from"./react-router.DMwpH23k.js";import"./CopyIcn.BnhKHfEP.js";import{S as N}from"./SnackMsg.7BjcJK1j.js";import{S as w}from"./Steps.B84Ui3GU.js";import{I as y,s as L}from"./Integrations.BFhED4ck.js";import D from"./SendFoxAuthorization.B0BNmXwm.js";import{h as E,i as T}from"./SendFoxCommonFunc.B3DCRLZz.js";import{S as A}from"./SendFoxIntegLayout.Dt4jRjlw.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 $({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};
