var _=Object.defineProperty,b=Object.defineProperties;var v=Object.getOwnPropertyDescriptors;var c=Object.getOwnPropertySymbols;var w=Object.prototype.hasOwnProperty,y=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(c)for(var e of c(t))y.call(t,e)&&g(a,e,t[e]);return a},x=(a,t)=>b(a,v(t));import{k as h,$ as I,h as E,g as k,i as L,j as s,_ as j}from"./main.2.8.10.js";import{u as $,b as d}from"./react-router.DMwpH23k.js";import{S as F}from"./SnackMsg.7BjcJK1j.js";import{S as R,I as U}from"./Integrations.BFhED4ck.js";import{h as D,s as K}from"./NotionCommonFunc.DXnv7q7e.js";import{N as M}from"./NotionIntegLayout.Df3PsD4I.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=$(),[e,m]=d.useState({show:!1}),l=h(I),[o,i]=E(k),[N,C]=d.useState({name:"",authKey:""}),p=h(L),[n,f]=d.useState({auth:!1,list:!1,page:!1,field:!1,update:!1}),S=r=>{f(x(u({},n),{update:r}))};return s.jsxs("div",{style:{width:900},children:[s.jsx(F,{snack:e,setSnackbar:m}),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=>D(r,o,i,N,C),value:o.name,type:"text",placeholder:j("Integration Name...","bit-integrations")})]}),s.jsx("div",{className:"my-3",children:s.jsx(R,{entity:l.triggered_entity,setSnackbar:m})}),s.jsx(M,{notionConf:o,setNotionConf:i,formFields:p,loading:n,setLoading:f}),s.jsx(U,{edit:!0,saveConfig:()=>{K(l,a,o,t,{edit:1},S)},isLoading:n.update,disabled:o.field_map.length<1,dataConf:o,setDataConf:i,formFields:p})]})}export{Z as default};
