import{j as t,_ as b}from"./main.2.9.0.js";import{u as j,e as S,b as a}from"./react-router.DMwpH23k.js";import"./CopyIcn.CEA_lFLo.js";import{B as T}from"./BackIcn._8Wofmn2.js";import{S as v}from"./SnackMsg.DYSD96P4.js";import{S as _}from"./Steps.BYe8zHkm.js";import{I,g as y}from"./Integrations.DL8wqGct.js";import C from"./TelegramAuthorization.BMC64eRP.js";import{T as k}from"./TelegramIntegLayout.Bcf6Ikym.js";import"./react-vendor.P7K3d6op.js";import"./Note.NSUdvR3c.js";import"./Table.BfF8RYFZ.js";import"./index.DpWdl9V1.js";import"./TelegramCommonFunc.D6FpaQ6s.js";import"./TutorialLink.CFG7bS5c.js";import"./CheckBox.EE_22KNp.js";import"./TinyMCE.Bf0Wkv3h.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};
