import{u as j,k as b,d as p,h as I,r as m,j as t}from"./main-406.js";import{g as w,$ as C,h as _,d as v,_ as c,i as y,I as N,s as S}from"./bi.394.85.js";import{h as l}from"./bi.56.800.js";import{W as A}from"./bi.215.801.js";import"./bi.141.747.js";/* empty css          */import"./bi.704.707.js";import"./bi.701.708.js";function B({allIntegURL:f}){const x=j(),{formID:g}=b(),[s,e]=p(w),[i,k]=p(C),r=I(_),[n,d]=m.useState(!1),[h,a]=m.useState({show:!1}),u=s.messageTypeId==="1"?s.body==="":s.templateName==="";return t.jsxs("div",{style:{width:900},children:[t.jsx(v,{snack:h,setSnackbar:a}),t.jsxs("div",{className:"flx mt-3",children:[t.jsx("b",{className:"wdt-200 d-in-b",children:c("Integration Name:","bit-integrations")}),t.jsx("input",{className:"btcd-paper-inp w-5",onChange:o=>l(o,s,e),name:"name",value:s.name,type:"text",placeholder:c("Integration Name...","bit-integrations")})]}),t.jsx("br",{}),t.jsx("br",{}),t.jsx(y,{entity:i.triggered_entity,setSnackbar:a}),t.jsx(A,{formID:g,formFields:r,handleInput:o=>l(o,s,e),whatsAppConf:s,setWhatsAppConf:e,isLoading:n,setIsLoading:d,setSnackbar:a}),t.jsx(N,{edit:!0,saveConfig:()=>S({flow:i,allIntegURL:f,conf:s,navigate:x,edit:1,setIsLoading:d,setSnackbar:a}),disabled:u||n,isLoading:n,dataConf:s,setDataConf:e,formFields:r}),t.jsx("br",{})]})}export{B as default};
