import{u as g,k as h,r as o,j as s}from"./main-406.js";import{d as j,G as b}from"./bi.394.85.js";import{S as L}from"./bi.68.941.js";import v from"./bi.738.248.js";import{W as I}from"./bi.771.743.js";import{T as n,t as T}from"./bi.150.760.js";import"./bi.46.744.js";function E({formFields:r,setFlow:c,flow:u,allIntegURL:m}){const d=g(),{formID:l}=h(),[e,k]=o.useState(1),[p,a]=o.useState({show:!1}),[x,S]=o.useState(!1),{sperse:t}=T,[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:p,setSnackbar:a}),s.jsx("div",{className:"txt-center mt-2",children:s.jsx(L,{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:t==null?void 0:t.title,youTubeLink:t==null?void 0:t.youTubeLink}),(t==null?void 0:t.docLink)&&s.jsx(n,{title:t==null?void 0:t.title,docLink:t==null?void 0:t.docLink}),s.jsx(v,{formID:l,formFields:r,webHooks:i,setWebHooks:f,step:e,setStep:k,setSnackbar:a,create:!0})]}),s.jsx("div",{className:"btcd-stp-page",style:{width:e===2&&"100%",height:e===2&&"auto"},children:s.jsx(I,{step:e,saveConfig:()=>b(u,c,m,i,d,"","",S),isLoading:x})})]})}export{E as default};
