var S=Object.defineProperty;var d=Object.getOwnPropertySymbols;var v=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var p=(t,s,a)=>s in t?S(t,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[s]=a,f=(t,s)=>{for(var a in s||(s={}))v.call(s,a)&&p(t,a,s[a]);if(d)for(var a of d(s))N.call(s,a)&&p(t,a,s[a]);return t};import{D as w,g as y,r as m,j as e,S as C,_ as l}from"./main-634.js";import{a7 as k}from"./bf-746-82.js";import{I as _}from"./bf-942-184.js";import{h as u,c as L}from"./bf-993-173.js";import{E as D}from"./bf-244-207.js";import"./bf-275-83.js";import"./bf-822-108.js";import"./bf-25-81.js";import"./bf-438-114.js";function H({formFields:t,setIntegration:s,integrations:a,allIntegURL:h}){const x=w(),{id:c,formID:g}=y(),[i,n]=m.useState(f({},a[c])),[j,E]=m.useState(!1),[I,o]=m.useState({show:!1}),b=()=>{if(!L(i)){o({show:!0,msg:l("Please map mandatory fields")});return}k(a,s,h,i,x,c,1)};return e.jsxs("div",{style:{width:900},children:[e.jsx(C,{snack:I,setSnackbar:o}),e.jsxs("div",{className:"flx mt-3",children:[e.jsx("b",{className:"wdt-200 d-in-b",children:l("Integration Name:")}),e.jsx("input",{className:"btcd-paper-inp w-5",onChange:r=>u(r,i,n),name:"name",value:i.name,type:"text",placeholder:l("Integration Name...")})]}),e.jsx("br",{}),e.jsx(D,{formID:g,formFields:t,handleInput:r=>u(r,i,n),elasticEmailConf:i,setElasticEmailConf:n,isLoading:j,setIsLoading:E,setSnackbar:o}),e.jsx(_,{edit:!0,saveConfig:b,disabled:i.field_map.length<1}),e.jsx("br",{})]})}export{H as default};
