import{u as b,k as j,r as o,j as s}from"./main-333.js";import{d as S,F as k}from"./bi.636.93.js";import{S as v}from"./bi.563.969.js";import N from"./bi.27.259.js";import{W as T}from"./bi.740.766.js";import{T as r,t as y}from"./bi.318.783.js";import"./bi.429.767.js";function P({formFields:c,setFlow:n,flow:m,allIntegURL:u}){const d=b(),{formID:p}=j(),[e,l]=o.useState(1),[x,a]=o.useState({show:!1}),[h,f]=o.useState(!1),{n8nLinks:t}=y,[i,g]=o.useState({name:"N8n Web Hooks",type:"N8n",method:"POST",url:"",apiConsole:"https://connect.n8n.com/dashboard"});return s.jsxs("div",{children:[s.jsx(S,{snack:x,setSnackbar:a}),s.jsx("div",{className:"txt-center mt-2",children:s.jsx(v,{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(r,{title:"n8n.io",youTubeLink:t==null?void 0:t.youTubeLink}),(t==null?void 0:t.docLink)&&s.jsx(r,{title:"n8n.io",docLink:t==null?void 0:t.docLink}),s.jsx(N,{formID:p,formFields:c,webHooks:i,setWebHooks:g,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(T,{step:e,saveConfig:()=>k(m,n,u,i,d,"","",f),isLoading:h})})]})}export{P as default};
