import{u as b,k as j,r as a,j as t}from"./main-406.js";import{d as T,_ as S,I as _,G as v}from"./bi.394.85.js";import{B as I}from"./bi.46.744.js";import{S as k}from"./bi.68.941.js";import y from"./bi.919.249.js";import{T as C}from"./bi.844.746.js";import"./bi.216.745.js";import"./bi.150.760.js";import"./bi.492.719.js";import"./bi.141.747.js";/* empty css          */function G({formFields:m,setFlow:g,flow:d,allIntegURL:f}){const x=b(),{formID:c}=j(),[o,i]=a.useState(!1),[s,p]=a.useState(1),[u,n]=a.useState({show:!1}),[e,r]=a.useState({name:"Telegram",type:"Telegram",parse_mode:"HTML",bot_api_key:"",chat_id:"",body:"",actions:{}}),h=l=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),l===3&&e.name!==""&&e.chat_id&&p(l)};return t.jsxs("div",{children:[t.jsx(T,{snack:u,setSnackbar:n}),t.jsx("div",{className:"txt-center mt-2",children:t.jsx(k,{step:3,active:s})}),t.jsx(y,{formID:c,telegramConf:e,setTelegramConf:r,step:s,setstep:p,isLoading:o,setIsLoading:i,setSnackbar:n}),t.jsxs("div",{className:"btcd-stp-page",style:{width:s===2&&900,height:s===2&&"auto",minHeight:s===2&&"200px"},children:[t.jsx(C,{formID:c,formFields:m,telegramConf:e,setTelegramConf:r,isLoading:o,setIsLoading:i,setSnackbar:n}),t.jsx("br",{}),t.jsx("br",{}),t.jsxs("button",{onClick:()=>h(3),disabled:e.chat_id==="",className:"btn f-right btcd-btn-lg purple sh-sm flx",type:"button",children:[S("Next","bit-integrations"),t.jsx(I,{className:"ml-1 rev-icn"})]})]}),t.jsx(_,{step:s,saveConfig:()=>v(d,g,f,e,x,0,!1,i),isLoading:o,dataConf:e,setDataConf:r,formFields:m})]})}export{G as default};
