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{G as k,g as E,r as n,j as e,S as L,_ as f}from"./main-343.js";import{a7 as M}from"./bf-659-81.js";import{I as Z}from"./bf-58-184.js";import{h as _}from"./bf-476-103.js";import{Z as R}from"./bf-987-197.js";import"./bf-974-82.js";import"./bf-649-79.js";import"./bf-188-107.js";function H({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(R,{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{H as default};
