import{u as g,k as h,r as o,j as s}from"./main-333.js";import{d as j,F as b}from"./bi.636.93.js";import{S as I}from"./bi.563.969.js";import L from"./bi.27.259.js";import{W as v}from"./bi.740.766.js";import{T as n,t as O}from"./bi.318.783.js";import"./bi.429.767.js";function E({formFields:r,setFlow:c,flow:p,allIntegURL:u}){const m=g(),{formID:d}=h(),[e,l]=o.useState(1),[k,a]=o.useState({show:!1}),[S,x]=o.useState(!1),{sperse:t}=O,[i,f]=o.useState({name:"SperseIO Web Hooks",type:"SperseIO",method:"POST",url:"",apiConsole:"https://sperse.io/"});return s.jsxs("div",{children:[s.jsx(j,{snack:k,setSnackbar:a}),s.jsx("div",{className:"txt-center mt-2",children:s.jsx(I,{step:2,active:e})}),s.jsxs("div",{className:"btcd-stp-page",style:{width:e===1&&1100,height:e===1&&"auto"},children:[(t==null?void 0:t.youTubeLink)&&s.jsx(n,{title:"Sperse IO",youTubeLink:t==null?void 0:t.youTubeLink}),(t==null?void 0:t.docLink)&&s.jsx(n,{title:"Sperse IO",docLink:t==null?void 0:t.docLink}),s.jsx(L,{formID:d,formFields:r,webHooks:i,setWebHooks:f,step:e,setStep:l,setSnackbar:a,create:!0})]}),s.jsx("div",{className:"btcd-stp-page",style:{width:e===2&&"100%",height:e===2&&"auto"},children:s.jsx(v,{step:e,saveConfig:()=>b(p,c,u,i,m,"","",x),isLoading:S})})]})}export{E as default};
