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{G as k,g as _,r as i,j as t,S as B,_ as p}from"./main-343.js";import{a7 as E}from"./bf-659-81.js";import{I as L}from"./bf-58-184.js";import{h as x,c as Z}from"./bf-985-93.js";import{Z as M}from"./bf-763-187.js";import"./bf-974-82.js";import"./bf-649-79.js";import"./bf-594-113.js";function H({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(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:N,disabled:n.module===""||n.field_map.length<1}),t.jsx("br",{})]})}export{H as default};
