import{j as t,_ as b}from"./main.2.8.1.js";import{u as j,h as S,d as a}from"./react-router-dom.9mCuUg3q.js";import"./Note.BeM7sN-p.js";import{B as T}from"./BackIcn._kGL_vVw.js";import{S as v}from"./SnackMsg.S8DrwLlT.js";import{S as _}from"./Steps.1hz7v9Vj.js";import{I,g as y}from"./Integrations.D2bgBas2.js";import C from"./TelegramAuthorization.CoFzL2kR.js";import{T as k}from"./TelegramIntegLayout.ClFkpOLI.js";import"./CopyIcn.3gZpHton.js";import"./Table.DAL7rcPQ.js";import"./index.wO-AxluA.js";import"./TelegramCommonFunc.DIkgRIjV.js";import"./tutorialLinks.kMkIDzcD.js";import"./TutorialLink.BAFX--T3.js";import"./CheckBox.Dg5Lw38s.js";import"./TinyMCE.Dcvv5APO.js";/* empty css                */function Q({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&&"200px"},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{Q as default};
