import{D as j,g as S,r as a,j as t,S as T}from"./main-634.js";import"./bf-25-81.js";import{S as b}from"./bf-54-258.js";import{a7 as y}from"./bf-746-82.js";import{I as v}from"./bf-942-184.js";import{N as I}from"./bf-123-109.js";import _ from"./bf-458-121.js";import{T as w}from"./bf-595-216.js";import"./bf-275-83.js";import"./bf-822-108.js";import"./bf-389-175.js";import"./bf-297-103.js";function A({formFields:g,setIntegration:d,integrations:l,allIntegURL:x}){const f=j(),{formID:r}=S(),[i,n]=a.useState(!1),[e,m]=a.useState(1),[h,o]=a.useState({show:!1}),[s,p]=a.useState({name:"Telegram",type:"Telegram",parse_mode:"HTML",bot_api_key:"",chat_id:"",body:"",actions:{}}),u=c=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),c===3&&s.name!==""&&s.chat_id&&m(c)};return t.jsxs("div",{children:[t.jsx(T,{snack:h,setSnackbar:o}),t.jsx("div",{className:"txt-center w-9 mt-2 cal-width",children:t.jsx(b,{step:3,active:e})}),t.jsx(_,{formID:r,telegramConf:s,setTelegramConf:p,step:e,setstep:m,isLoading:i,setisLoading:n,setSnackbar:o}),t.jsxs("div",{className:"btcd-stp-page",style:{width:e===2&&900,height:e===2&&"100%",minHeight:e===2&&"200px"},children:[t.jsx(w,{formID:r,formFields:g,telegramConf:s,setTelegramConf:p,isLoading:i,setisLoading:n,setSnackbar:o}),t.jsx("br",{}),t.jsx("br",{}),t.jsx(I,{nextPageHandler:()=>u(3),disabled:s.chat_id===""})]}),t.jsx(v,{step:e,saveConfig:()=>y(l,d,x,s,f)})]})}export{A as default};
