var N=Object.defineProperty;var f=Object.getOwnPropertySymbols;var y=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable;var g=(a,e,s)=>e in a?N(a,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):a[e]=s,h=(a,e)=>{for(var s in e||(e={}))y.call(e,s)&&g(a,s,e[s]);if(f)for(var s of f(e))C.call(e,s)&&g(a,s,e[s]);return a};import{v as k,w as _,r as i,j as t,S as B,_ as p}from"./main-40.js";import{b as E}from"./bf-132-75.js";import{I as L}from"./bf-94-335.js";import{h as x,c as Z}from"./bf-306-339.js";import{Z as M}from"./bf-657-340.js";import"./bf-190-73.js";import"./bf-528-128.js";import"./bf-200-122.js";import"./bf-689-131.js";function J({formFields:a,setIntegration:e,integrations:s,allIntegURL:b}){const j=k(),{id:c,formID:l}=_(),[n,r]=i.useState(h({},s[c])),[I,u]=i.useState(!1),[S,o]=i.useState({show:!1}),[m,v]=i.useState(0),w=()=>{if(!Z(n)){o({show:!0,msg:p("Please map mandatory fields")});return}E(s,e,b,n,j,c,1)};return t.jsxs("div",{style:{width:900},children:[t.jsx(B,{snack:S,setSnackbar:o}),t.jsxs("div",{className:"flx mt-3",children:[t.jsx("b",{className:"wdt-100 d-in-b",children:p("Integration Name:")}),t.jsx("input",{className:"btcd-paper-inp w-7",onChange:d=>x(d,m,n,r),name:"name",value:n.name,type:"text",placeholder:p("Integration Name...")})]}),t.jsx("br",{}),t.jsx("br",{}),t.jsx(M,{tab:m,settab:v,formID:l,formFields:a,handleInput:d=>x(d,m,n,r,l,u,o),biginConf:n,setBiginConf:r,isLoading:I,setisLoading:u,setSnackbar:o}),t.jsx(L,{edit:!0,saveConfig:w,disabled:n.module===""||n.field_map.length<1}),t.jsx("br",{})]})}export{J as default};
