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