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