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,b as E,h as k,i as z,j as s,_ as S}from"./main.2.8.1.js";import{u as L,d}from"./react-router-dom.9mCuUg3q.js";import{S as $}from"./SnackMsg.S8DrwLlT.js";import{S as F,I as R}from"./Integrations.D2bgBas2.js";import{h as U,s as D}from"./SelzyCommonFunc.BO1RenoT.js";import{S as K}from"./SelzyIntegLayout.-_HpH4Bh.js";import"./Note.BeM7sN-p.js";import"./CopyIcn.3gZpHton.js";import"./Table.DAL7rcPQ.js";import"./index.wO-AxluA.js";import"./GlobalIntegrationHelper.CgnhJgll.js";import"./TagifyInput.Cu0YIRbG.js";import"./tagify.YxUZd8Ix.js";function Y({allIntegURL:a}){const t=L(),[e,l]=d.useState({show:!1}),m=h(N),[n,i]=E(k),[j,y]=d.useState({name:"",authKey:""}),p=h(z),[o,c]=d.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:l}),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,n,i,j,y),value:n.name,type:"text",placeholder:S("Integration Name...","bit-integrations")})]}),s.jsx("div",{className:"my-3",children:s.jsx(F,{entity:m.triggered_entity,setSnackbar:l})}),s.jsx(K,{selzyConf:n,setSelzyConf:i,formFields:p,loading:o,setLoading:c}),s.jsx(R,{edit:!0,saveConfig:()=>{D(m,a,n,t,{edit:1},C)},isLoading:o.update,disabled:n.field_map.length<1,dataConf:n,setDataConf:i,formFields:p})]})}export{Y as default};
