var _=Object.defineProperty,b=Object.defineProperties;var v=Object.getOwnPropertyDescriptors;var f=Object.getOwnPropertySymbols;var w=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable;var g=(a,t,e)=>t in a?_(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e,u=(a,t)=>{for(var e in t||(t={}))w.call(t,e)&&g(a,e,t[e]);if(f)for(var e of f(t))I.call(t,e)&&g(a,e,t[e]);return a},x=(a,t)=>b(a,v(t));import{k as h,$ as N,h as E,g as k,i as z,j as s,_ as S}from"./main.2.8.10.js";import{u as L,b as m}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"./SelzyCommonFunc.BXJ1RhU4.js";import{S as K}from"./SelzyIntegLayout.nLK_tjUc.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,d]=m.useState({show:!1}),l=h(N),[i,n]=E(k),[j,y]=m.useState({name:"",authKey:""}),p=h(z),[o,c]=m.useState({auth:!1,list:!1,tag:!1,page:!1,update:!1}),C=r=>{c(x(u({},o),{update:r}))};return s.jsxs("div",{style:{width:900},children:[s.jsx($,{snack:e,setSnackbar:d}),s.jsxs("div",{className:"flx mt-3",children:[s.jsx("b",{className:"wdt-200 d-in-b",children:S("Integration Name:","bit-integrations")}),s.jsx("input",{className:"btcd-paper-inp w-5",name:"name",onChange:r=>U(r,i,n,j,y),value:i.name,type:"text",placeholder:S("Integration Name...","bit-integrations")})]}),s.jsx("div",{className:"my-3",children:s.jsx(F,{entity:l.triggered_entity,setSnackbar:d})}),s.jsx(K,{selzyConf:i,setSelzyConf:n,formFields:p,loading:o,setLoading:c}),s.jsx(R,{edit:!0,saveConfig:()=>{D(l,a,i,t,{edit:1},C)},isLoading:o.update,disabled:i.field_map.length<1,dataConf:i,setDataConf:n,formFields:p})]})}export{Z as default};
