var b=Object.defineProperty,v=Object.defineProperties;var w=Object.getOwnPropertyDescriptors;var f=Object.getOwnPropertySymbols;var y=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable;var u=(a,t,e)=>t in a?b(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e,g=(a,t)=>{for(var e in t||(t={}))y.call(t,e)&&u(a,e,t[e]);if(f)for(var e of f(t))I.call(t,e)&&u(a,e,t[e]);return a},x=(a,t)=>v(a,w(t));import{k as h,$ as N,h as E,g as M,i as k,j as s,_ as j}from"./main.2.8.10.js";import{u as L,b as d}from"./react-router.DMwpH23k.js";import{S as $}from"./SnackMsg.7BjcJK1j.js";import{S as F,I as R}from"./Integrations.BFhED4ck.js";import{h as U,s as D}from"./MailercloudCommonFunc.BCv3ecKj.js";import{M as K}from"./MailercloudIntegLayout.CyZmSgRC.js";import"./react-vendor.P7K3d6op.js";import"./Note.DalStCGz.js";import"./CopyIcn.BnhKHfEP.js";import"./Table.DSsAy4VI.js";import"./index.DpWdl9V1.js";import"./GlobalIntegrationHelper.Belqr4OT.js";import"./TagifyInput.C4ilRm4k.js";import"./lodash.DCvQBX3r.js";function Z({allIntegURL:a}){const t=L(),[e,l]=d.useState({show:!1}),m=h(N),[i,o]=E(M),[C,S]=d.useState({name:"",authKey:""}),p=h(k),[n,c]=d.useState({auth:!1,list:!1,page:!1,update:!1}),_=r=>{c(x(g({},n),{update:r}))};return s.jsxs("div",{style:{width:900},children:[s.jsx($,{snack:e,setSnackbar:l}),s.jsxs("div",{className:"flx mt-3",children:[s.jsx("b",{className:"wdt-200 d-in-b",children:j("Integration Name:","bit-integrations")}),s.jsx("input",{className:"btcd-paper-inp w-5",name:"name",onChange:r=>U(r,i,o,C,S),value:i.name,type:"text",placeholder:j("Integration Name...","bit-integrations")})]}),s.jsx("div",{className:"my-3",children:s.jsx(F,{entity:m.triggered_entity,setSnackbar:l})}),s.jsx(K,{mailercloudConf:i,setMailercloudConf:o,formFields:p,loading:n,setLoading:c}),s.jsx(R,{edit:!0,saveConfig:()=>{D(m,a,i,t,{edit:1},_)},isLoading:n.update,disabled:i.field_map.length<1,dataConf:i,setDataConf:o,formFields:p})]})}export{Z as default};
