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