var v=Object.defineProperty;var c=Object.getOwnPropertySymbols;var S=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable;var l=(e,t,s)=>t in e?v(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,u=(e,t)=>{for(var s in t||(t={}))S.call(t,s)&&l(e,s,t[s]);if(c)for(var s of c(t))w.call(t,s)&&l(e,s,t[s]);return e};import{v as N,w as y,r as p,j as a,S as C,_ as m}from"./main-40.js";import{b as k}from"./bf-132-75.js";import{I as H}from"./bf-94-335.js";import{h as f,H as _,c as E}from"./bf-185-370.js";import"./bf-528-128.js";import"./bf-200-122.js";import"./bf-689-131.js";/* empty css          */function B({formFields:e,setIntegration:t,integrations:s,allIntegURL:h}){const x=N(),{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,t,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:e,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{B as default};
