import{h as p,g as h,$ as j,k as b,i as I,j as e,_ as r}from"./main.2.8.10.js";import{u as _,b as l}from"./react-router.DMwpH23k.js";import{S as w}from"./SnackMsg.7BjcJK1j.js";import"./Note.DalStCGz.js";import"./CopyIcn.BnhKHfEP.js";import{S,I as v,s as y}from"./Integrations.BFhED4ck.js";import{M as C}from"./MailupIntegLayout.DJjTHmY6.js";import{h as c,c as M}from"./MailupCommonFunc.CtCRKgy-.js";import"./react-vendor.P7K3d6op.js";import"./Table.DSsAy4VI.js";import"./index.DpWdl9V1.js";import"./TagifyInput.C4ilRm4k.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};
