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{G as w,g as y,r as d,j as n,S as C,_ as l}from"./main-343.js";import{a7 as M}from"./bf-659-81.js";import{I as H}from"./bf-58-184.js";import{h,c as _}from"./bf-483-99.js";import{Z as E}from"./bf-709-193.js";import"./bf-974-82.js";import"./bf-649-79.js";import"./bf-594-113.js";function z({formFields:a,setIntegration:t,integrations:e,allIntegURL:x}){const b=w(),{id:p,formID:r}=y(),[s,i]=d.useState(g({},e[p])),[j,c]=d.useState(!1),[I,o]=d.useState({show:!1}),k=()=>{if(!_(s)){o({show:!0,msg:l("Please map mandatory fields")});return}M(e,t,x,s,b,p,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:l("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:l("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{z as default};
