import{j as t,_ as b}from"./main.2.8.10.js";import{u as j,e as S,b as a}from"./react-router.DMwpH23k.js";import"./CopyIcn.BnhKHfEP.js";import{B as T}from"./BackIcn.BFDZx8No.js";import{S as v}from"./SnackMsg.7BjcJK1j.js";import{S as _}from"./Steps.B84Ui3GU.js";import{I,g as y}from"./Integrations.BFhED4ck.js";import C from"./TelegramAuthorization._9XZoyTF.js";import{T as k}from"./TelegramIntegLayout.a_xP3KLb.js";import"./react-vendor.P7K3d6op.js";import"./Note.DalStCGz.js";import"./Table.DSsAy4VI.js";import"./index.DpWdl9V1.js";import"./TelegramCommonFunc.CPGorEZC.js";import"./TutorialLink.D6K_DiHL.js";import"./CheckBox.CJ75Ftxb.js";import"./TinyMCE.febRbUdQ.js";/* empty css                */function U({formFields:m,setFlow:l,flow:g,allIntegURL:d}){const f=j(),{formID:p}=S(),[o,r]=a.useState(!1),[s,c]=a.useState(1),[x,i]=a.useState({show:!1}),[e,n]=a.useState({name:"Telegram",type:"Telegram",parse_mode:"HTML",bot_api_key:"",chat_id:"",body:"",actions:{}}),u=h=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),e.name!==""&&e.chat_id&&c(h)};return t.jsxs("div",{children:[t.jsx(v,{snack:x,setSnackbar:i}),t.jsx("div",{className:"txt-center mt-2",children:t.jsx(_,{step:3,active:s})}),t.jsx(C,{formID:p,telegramConf:e,setTelegramConf:n,step:s,setstep:c,isLoading:o,setIsLoading:r,setSnackbar:i}),t.jsxs("div",{className:"btcd-stp-page",style:{width:s===2&&900,height:s===2&&"auto",minHeight:s===2&&"500px"},children:[t.jsx(k,{formID:p,formFields:m,telegramConf:e,setTelegramConf:n,isLoading:o,setIsLoading:r,setSnackbar:i}),t.jsx("br",{}),t.jsx("br",{}),t.jsxs("button",{onClick:()=>u(3),disabled:e.chat_id==="",className:"btn f-right btcd-btn-lg purple sh-sm flx",type:"button",children:[b("Next","bit-integrations"),t.jsx(T,{className:"ml-1 rev-icn"})]})]}),t.jsx(I,{step:s,saveConfig:()=>y(g,l,d,e,f,0,!1,r),isLoading:o,dataConf:e,setDataConf:n,formFields:m})]})}export{U as default};
