var C=Object.defineProperty;var p=Object.getOwnPropertySymbols;var N=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;var u=(s,e,t)=>e in s?C(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,f=(s,e)=>{for(var t in e||(e={}))N.call(e,t)&&u(s,t,e[t]);if(p)for(var t of p(e))_.call(e,t)&&u(s,t,e[t]);return s};import{v as w,w as L,r,j as a,S as q}from"./main-40.js";/* empty css          */import{S as E}from"./bf-679-136.js";import{b as P}from"./bf-132-75.js";import{I as T}from"./bf-94-335.js";import{N as A}from"./bf-504-404.js";import B from"./bf-336-271.js";import{h as D,i as U}from"./bf-688-397.js";import{S as z}from"./bf-950-398.js";import"./bf-860-126.js";import"./bf-892-199.js";import"./bf-141-80.js";import"./bf-586-70.js";import"./bf-541-403.js";import"./bf-528-128.js";import"./bf-200-122.js";import"./bf-689-131.js";function oe({formFields:s,setIntegration:e,integrations:t,allIntegURL:x}){const b=w(),{formID:F}=L(),[d,n]=r.useState(!1),[i,c]=r.useState(1),[S,l]=r.useState({show:!1}),g=[{key:"1",label:"Create List"},{key:"2",label:"Create Contact"},{key:"3",label:"Unsubscribe Contact"}],h=[{key:"email",label:"Email",required:!0},{key:"first_name",label:"First Name",required:!1},{key:"last_name",label:"Last Name",required:!1}],y=[{key:"name",label:"Name",required:!0}],k=[{key:"email",label:"Email",required:!0}],[o,m]=r.useState({name:"SendFox",type:"SendFox",listId:"",access_token:"",field_map:[{formField:"",sendFoxFormField:""}],field_map_list:[{formField:"",sendFoxListFormField:""}],field_map_unsubscribe:[{formField:"",sendFoxUnsubscribeFormField:""}],allActions:g,contactFields:h,unsubscribeFields:k,listFields:y,actions:{}}),j=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),c(3)},v=()=>{P(t,e,x,o,b)};return a.jsxs("div",{children:[a.jsx(q,{snack:S,setSnackbar:l}),a.jsx("div",{className:"txt-center w-9 mt-2 cal-width",children:a.jsx(E,{step:3,active:i})}),a.jsx(B,{formID:F,sendFoxConf:o,setSendFoxConf:m,step:i,setstep:c,isLoading:d,setIsLoading:n,setSnackbar:l}),a.jsxs("div",{className:"btcd-stp-page",style:f({},i===2&&{width:900,height:"auto",overflow:"visible"}),children:[a.jsx(z,{formFields:s,handleInput:I=>D(I,o,m,n),sendFoxConf:o,setSendFoxConf:m,isLoading:d,setIsLoading:n,setSnackbar:l}),a.jsx(A,{nextPageHandler:()=>j(),disabled:U(o)})]}),a.jsx(T,{step:i,saveConfig:()=>v()})]})}export{oe as default};
