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