var S=Object.defineProperty;var c=Object.getOwnPropertySymbols;var v=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var l=(e,t,s)=>t in e?S(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,u=(e,t)=>{for(var s in t||(t={}))v.call(t,s)&&l(e,s,t[s]);if(c)for(var s of c(t))N.call(t,s)&&l(e,s,t[s]);return e};import{D as w,g as y,r as p,j as a,S as C,_ as m}from"./main-634.js";import{a7 as k}from"./bf-746-82.js";import{I as H}from"./bf-942-184.js";import{h as f,H as _,c as E}from"./bf-387-205.js";import"./bf-275-83.js";import"./bf-822-108.js";import"./bf-25-81.js";import"./bf-438-114.js";function A({formFields:e,setIntegration:t,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,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{A as default};
