import{h as d,g as h,$ as b,k as I,i as S,j as t,_ as l}from"./main.2.9.0.js";import{u as _,e as v,b as n}from"./react-router.DMwpH23k.js";import{S as w}from"./SnackMsg.DYSD96P4.js";import"./Note.NSUdvR3c.js";import"./CopyIcn.CEA_lFLo.js";import{S as C,I as N,s as y}from"./Integrations.DL8wqGct.js";import{h as T}from"./TelegramCommonFunc.D6FpaQ6s.js";import{T as k}from"./TelegramIntegLayout.Bcf6Ikym.js";import"./react-vendor.P7K3d6op.js";import"./Table.BfF8RYFZ.js";import"./index.DpWdl9V1.js";import"./CheckBox.EE_22KNp.js";import"./TinyMCE.Bf0Wkv3h.js";/* empty css                */function K({allIntegURL:p}){const f=_(),{formID:g}=v(),[e,a]=d(h),[i,E]=d(b),r=I(S),[o,m]=n.useState(!1),[x,s]=n.useState({show:!1}),[u,j]=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:c=>{j(c.target.value),T(c,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{K as default};
