import{h as p,g as h,$ as j,k as b,i as I,j as e,_ as r}from"./main.2.9.0.js";import{u as _,b as l}from"./react-router.DMwpH23k.js";import{S as w}from"./SnackMsg.DYSD96P4.js";import"./Note.NSUdvR3c.js";import"./CopyIcn.CEA_lFLo.js";import{S,I as v,s as y}from"./Integrations.DL8wqGct.js";import{M as C}from"./MailupIntegLayout.BoOmRpY6.js";import{h as c,c as M}from"./MailupCommonFunc.CvOSpi-8.js";import"./react-vendor.P7K3d6op.js";import"./Table.BfF8RYFZ.js";import"./index.DpWdl9V1.js";import"./TagifyInput.KPPRQJ1B.js";import"./lodash.DCvQBX3r.js";function G({allIntegURL:f}){const g=_(),[t,a]=p(h),[i,N]=p(j),m=b(I),[d,n]=l.useState(!1),[u,s]=l.useState({show:!1}),x=()=>{if(!M(t)){s({show:!0,msg:r("Please map mandatory fields","bit-integrations")});return}y({flow:i,allIntegURL:f,conf:t,navigate:g,edit:1,setIsLoading:n,setSnackbar:s})};return e.jsxs("div",{style:{width:900},children:[e.jsx(w,{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:o=>c(o,t,a),name:"name",value:t.name,type:"text",placeholder:r("Integration Name...","bit-integrations")})]}),e.jsx("br",{}),e.jsx(S,{entity:i.triggered_entity,setSnackbar:s}),e.jsx(C,{formID:i.triggered_entity_id,formFields:m,handleInput:o=>c(o,t,a,n,s),mailupConf:t,setMailupConf:a,isLoading:d,setIsLoading:n,setSnackbar:s}),e.jsx(v,{edit:!0,saveConfig:x,disabled:!(t!=null&&t.listId),isLoading:d,dataConf:t,setDataConf:a,formFields:m}),e.jsx("br",{})]})}export{G as default};
