var N=Object.defineProperty;var p=Object.getOwnPropertySymbols;var C=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable;var l=(a,s,t)=>s in a?N(a,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[s]=t,u=(a,s)=>{for(var t in s||(s={}))C.call(s,t)&&l(a,t,s[t]);if(p)for(var t of p(s))y.call(s,t)&&l(a,t,s[t]);return a};import{D as k,g as E,r as n,j as e,S as L,_ as f}from"./main-634.js";import{a7 as M}from"./bf-746-82.js";import{I as Z}from"./bf-942-184.js";import{h as _}from"./bf-961-101.js";import{Z as D}from"./bf-836-197.js";import"./bf-275-83.js";import"./bf-822-108.js";import"./bf-25-81.js";import"./bf-723-105.js";function J({formFields:a,setIntegration:s,integrations:t,allIntegURL:h}){const x=k(),{id:r,formID:g}=E(),[j,S]=n.useState(!1),[o,c]=n.useState(u({},t[r])),[b,m]=n.useState({show:!1}),[I,w]=n.useState({show:!1}),v=()=>{var i,d;if((i=o.actions)!=null&&i.update&&((d=o.actions)==null?void 0:d.update.criteria)===""&&I.show!=="criteria"){w({show:"criteria"});return}M(t,s,h,o,x,r,1)};return e.jsxs("div",{style:{width:900},children:[e.jsx(L,{snack:b,setSnackbar:m}),e.jsxs("div",{className:"flx mt-3",children:[e.jsx("b",{className:"wdt-100 d-in-b",children:f("Integration Name:")}),e.jsx("input",{className:"btcd-paper-inp w-7",onChange:i=>_(i,o,c),name:"name",value:o.name,type:"text",placeholder:f("Integration Name...")})]}),e.jsx("br",{}),e.jsx("br",{}),e.jsx(D,{formID:g,formFields:a,signConf:o,setSignConf:c,isLoading:j,setisLoading:S,setSnackbar:m}),e.jsx(Z,{edit:!0,saveConfig:v,disabled:o.template===""}),e.jsx("br",{})]})}export{J as default};
