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.9.0.js";import{u as C,e as k,b as d}from"./react-router.DMwpH23k.js";import"./CopyIcn.CEA_lFLo.js";import{S as N}from"./SnackMsg.DYSD96P4.js";import{S as w}from"./Steps.BYe8zHkm.js";import{I as y,s as L}from"./Integrations.DL8wqGct.js";import D from"./SendFoxAuthorization.C241zrvZ.js";import{h as E,i as T}from"./SendFoxCommonFunc.BXWHC2Im.js";import{S as A}from"./SendFoxIntegLayout.v_NjpLes.js";import"./react-vendor.P7K3d6op.js";import"./Note.NSUdvR3c.js";import"./Table.BfF8RYFZ.js";import"./index.DpWdl9V1.js";import"./BackIcn._8Wofmn2.js";import"./TutorialLink.CFG7bS5c.js";import"./TagifyInput.KPPRQJ1B.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};
