var w=Object.defineProperty;var f=Object.getOwnPropertySymbols;var y=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable;var g=(a,e,s)=>e in a?w(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{D as k,g as _,r as i,j as t,S as B,_ as p}from"./main-634.js";import{a7 as E}from"./bf-746-82.js";import{I as L}from"./bf-942-184.js";import{h as x,c as Z}from"./bf-473-91.js";import{Z as D}from"./bf-925-187.js";import"./bf-275-83.js";import"./bf-822-108.js";import"./bf-25-81.js";import"./bf-438-114.js";function J({formFields:a,setIntegration:e,integrations:s,allIntegURL:j}){const b=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),N=()=>{if(!Z(n)){o({show:!0,msg:p("Please map mandatory fields")});return}E(s,e,j,n,b,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(D,{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:N,disabled:n.module===""||n.field_map.length<1}),t.jsx("br",{})]})}export{J as default};
