import{b as c,h as j,$ as b,k as I,i as S,j as t,_ as l}from"./main.2.8.1.js";import{u as _,h as v,d as n}from"./react-router-dom.9mCuUg3q.js";import{S as w}from"./SnackMsg.S8DrwLlT.js";import"./Note.BeM7sN-p.js";import{S as C,I as N,s as y}from"./Integrations.D2bgBas2.js";import{h as T}from"./TelegramCommonFunc.DIkgRIjV.js";import{T as k}from"./TelegramIntegLayout.ClFkpOLI.js";import"./CopyIcn.3gZpHton.js";import"./Table.DAL7rcPQ.js";import"./index.wO-AxluA.js";import"./CheckBox.Dg5Lw38s.js";import"./TinyMCE.Dcvv5APO.js";/* empty css                */function J({allIntegURL:p}){const f=_(),{formID:g}=v(),[e,a]=c(j),[i,E]=c(b),r=I(S),[o,m]=n.useState(!1),[x,s]=n.useState({show:!1}),[u,h]=n.useState((e==null?void 0:e.name)||"");return t.jsxs("div",{style:{width:900},children:[t.jsx(w,{snack:x,setSnackbar:s}),t.jsxs("div",{className:"flx mt-3",children:[t.jsx("b",{className:"wdt-150 d-in-b",children:l("Integration Name:","bit-integrations")}),t.jsx("input",{className:"btcd-paper-inp w-5",onChange:d=>{h(d.target.value),T(d,e,a)},name:"name",value:u,type:"text",placeholder:l("Integration Name...","bit-integrations")})]}),t.jsx("br",{}),t.jsx("br",{}),t.jsx(C,{entity:i.triggered_entity,setSnackbar:s}),t.jsx(k,{formID:g,formFields:r,telegramConf:e,setTelegramConf:a,isLoading:o,setIsLoading:m,setSnackbar:s}),t.jsx(N,{edit:!0,saveConfig:()=>y({flow:i,allIntegURL:p,conf:e,navigate:f,edit:1,setIsLoading:m,setSnackbar:s}),disabled:e.chat_id===""||o,isLoading:o,dataConf:e,setDataConf:a,formFields:r}),t.jsx("br",{})]})}export{J as default};
