import{u as h,k as w,d as c,r as m,h as b,j as e}from"./main-406.js";import{$ as j,g as I,h as _,d as y,_ as r,i as C,I as v,s as F}from"./bi.394.85.js";import{h as f}from"./bi.330.723.js";import{T as N}from"./bi.966.724.js";function L({allIntegURL:g}){const u=h();w();const[i,S]=c(j),[t,a]=c(I),[n,d]=m.useState(!1),[x,s]=m.useState({show:!1}),l=b(_),p=()=>{if(t.to===""&&t.body===""){s({show:!0,msg:r("Please select To and Body field , it is required","bit-integrations")});return}F({flow:i,allIntegURL:g,conf:t,navigate:u,edit:1,setIsLoading:d,setSnackbar:s})};return e.jsxs("div",{style:{width:900},children:[e.jsx(y,{snack:x,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:o=>f(o,t,a),name:"name",value:t.name,type:"text",placeholder:r("Integration Name...","bit-integrations")})]}),e.jsx("br",{}),e.jsx(C,{entity:i.triggered_entity,setSnackbar:s}),e.jsx(N,{formID:i.triggered_entity_id,formFields:l,handleInput:o=>f(o,t,a),twilioConf:t,setTwilioConf:a,isLoading:n,setIsLoading:d,setSnackbar:s}),e.jsx(v,{edit:!0,saveConfig:p,disabled:n||t.to===""&&t.body==="",isLoading:n,dataConf:t,setDataConf:a,formFields:l}),e.jsx("br",{})]})}export{L as default};
