import{b as m,$ as j,h as b,k as I,i as _,j as t,_ as o}from"./main.2.8.1.js";import{u as w,d as r}from"./react-router-dom.9mCuUg3q.js";import{S as C}from"./SnackMsg.S8DrwLlT.js";import"./Note.BeM7sN-p.js";import{S as v,I as y,s as F}from"./Integrations.D2bgBas2.js";import{h as l,c as f}from"./SendGridCommonFunc.C-4o5Kgg.js";import{S as N}from"./SendGridIntegLayout.D63eydpL.js";import"./CopyIcn.3gZpHton.js";import"./Table.DAL7rcPQ.js";import"./index.wO-AxluA.js";import"./TagifyInput.Cu0YIRbG.js";import"./tagify.YxUZd8Ix.js";function H({allIntegURL:c}){const p=w(),[i,k]=m(j),[e,a]=m(b),[g,E]=r.useState(!1),[u,x]=r.useState({list:!1,field:!1,auth:!1,tags:!1}),[h,s]=r.useState({show:!1}),d=I(_),S=()=>{if(!f(e)){s({show:!0,msg:o("Please map mandatory fields","bit-integrations")});return}F({flow:i,allIntegURL:c,conf:e,navigate:p,edit:1,setSnackbar:s})};return t.jsxs("div",{style:{width:900},children:[t.jsx(C,{snack:h,setSnackbar:s}),t.jsxs("div",{className:"flx mt-3",children:[t.jsx("b",{className:"wdt-200 d-in-b",children:o("Integration Name:","bit-integrations")}),t.jsx("input",{className:"btcd-paper-inp w-5",onChange:n=>l(n,e,a),name:"name",value:e.name,type:"text",placeholder:o("Integration Name...","bit-integrations")})]}),t.jsx("br",{}),t.jsx(v,{entity:i.triggered_entity,setSnackbar:s}),t.jsx(N,{formID:i.triggered_entity_id,formFields:d,handleInput:n=>l(n,e,a),sendGridConf:e,setSendGridConf:a,loading:u,setLoading:x,setSnackbar:s}),t.jsx(y,{edit:!0,saveConfig:S,disabled:!f(e),isLoading:g,dataConf:e,setDataConf:a,formFields:d}),t.jsx("br",{})]})}export{H as default};
