var b=Object.defineProperty;var m=Object.getOwnPropertySymbols;var v=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var d=(s,t,e)=>t in s?b(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e,p=(s,t)=>{for(var e in t||(t={}))v.call(t,e)&&d(s,e,t[e]);if(m)for(var e of m(t))N.call(t,e)&&d(s,e,t[e]);return s};import{G as y,g as C,r as l,j as a,_ as c,z as G}from"./main-343.js";import{a7 as _}from"./bf-659-81.js";import{I as w}from"./bf-58-184.js";import{h as g,G as E,c as L}from"./bf-741-206.js";import"./bf-974-82.js";import"./bf-649-79.js";import"./bf-594-113.js";function T({formFields:s,setIntegration:t,integrations:e,allIntegURL:f}){const u=y(),{id:o,formID:x}=C(),[n,i]=l.useState(p({},e[o])),[h,j]=l.useState(!1),I=()=>{if(!L(n)){G.error("Please map mandatory fields");return}_(e,t,f,n,u,o,1)};return a.jsxs("div",{style:{width:900},children:[a.jsxs("div",{className:"flx mt-3",children:[a.jsx("b",{className:"wdt-200 d-in-b",children:c("Integration Name:")}),a.jsx("input",{className:"btcd-paper-inp w-5",onChange:r=>g(r,n,i),name:"name",value:n.name,type:"text",placeholder:c("Integration Name...")})]}),a.jsx("br",{}),a.jsx(E,{formID:x,formFields:s,handleInput:r=>g(r,n,i),getgistConf:n,setGetgistConf:i,isLoading:h,setIsLoading:j}),a.jsx(w,{edit:!0,saveConfig:I,disabled:n.field_map.length<1}),a.jsx("br",{})]})}export{T as default};
