import{h as l,$ as b,g as h,k as w,i as j,j as e,_ as r}from"./main.2.9.0.js";import{u as I,e as _,b as c}from"./react-router.DMwpH23k.js";import{S as y}from"./SnackMsg.DYSD96P4.js";import"./Note.NSUdvR3c.js";import"./CopyIcn.CEA_lFLo.js";import{S as C,I as S,s as v}from"./Integrations.DL8wqGct.js";import{h as f}from"./TwilioCommonFunc.4-1cxKfZ.js";import{T as F}from"./TwilioIntegLayout.MT5lZyRh.js";import"./react-vendor.P7K3d6op.js";import"./Table.BfF8RYFZ.js";import"./index.DpWdl9V1.js";function z({allIntegURL:p}){const g=I(),{id:N}=_(),[o,T]=l(b),[t,i]=l(h),[a,d]=c.useState(!1),[u,s]=c.useState({show:!1}),m=w(j),x=()=>{if(t.to===""&&t.body===""){s({show:!0,msg:r("Please select To and Body field , it is required","bit-integrations")});return}v({flow:o,allIntegURL:p,conf:t,navigate:g,edit:1,setIsLoading:d,setSnackbar:s})};return e.jsxs("div",{style:{width:900},children:[e.jsx(y,{snack:u,setSnackbar:s}),e.jsxs("div",{className:"flx mt-3",children:[e.jsx("b",{className:"wdt-200 d-in-b",children:r("Integration Name:","bit-integrations")}),e.jsx("input",{className:"btcd-paper-inp w-5",onChange:n=>f(n,t,i),name:"name",value:t.name,type:"text",placeholder:r("Integration Name...","bit-integrations")})]}),e.jsx("br",{}),e.jsx(C,{entity:o.triggered_entity,setSnackbar:s}),e.jsx(F,{formID:o.triggered_entity_id,formFields:m,handleInput:n=>f(n,t,i),twilioConf:t,setTwilioConf:i,isLoading:a,setIsLoading:d,setSnackbar:s}),e.jsx(S,{edit:!0,saveConfig:x,disabled:a||t.to===""&&t.body==="",isLoading:a,dataConf:t,setDataConf:i,formFields:m}),e.jsx("br",{})]})}export{z as default};
