import{G as j,g as S,r as a,j as t,S as T}from"./main-343.js";import"./bf-649-79.js";import{S as b}from"./bf-149-261.js";import{a7 as y}from"./bf-659-81.js";import{I as v}from"./bf-58-184.js";import{N as I}from"./bf-713-109.js";import _ from"./bf-735-120.js";import{T as w}from"./bf-894-216.js";import"./bf-974-82.js";import"./bf-673-175.js";import"./bf-529-105.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,c]=a.useState({name:"Telegram",type:"Telegram",parse_mode:"HTML",bot_api_key:"",chat_id:"",body:"",actions:{}}),u=p=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),p===3&&s.name!==""&&s.chat_id&&m(p)};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:c,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:c,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};
