var I=Object.defineProperty;var l=Object.getOwnPropertySymbols;var v=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;var d=(a,s,e)=>s in a?I(a,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[s]=e,c=(a,s)=>{for(var e in s||(s={}))v.call(s,e)&&d(a,e,s[e]);if(l)for(var e of l(s))S.call(s,e)&&d(a,e,s[e]);return a};import{v as w,w as N,r as i,j as t,S as F,_ as p}from"./main-40.js";import{b as _}from"./bf-132-75.js";import{I as k}from"./bf-94-335.js";import{h as y,F as E,c as L}from"./bf-504-386.js";import"./bf-528-128.js";import"./bf-200-122.js";import"./bf-689-131.js";function B({formFields:a,setIntegration:s,integrations:e,allIntegURL:u}){const f=w(),{id:o,formID:x}=N(),[n,m]=i.useState(c({},e[o])),[h,g]=i.useState(!1),[j,r]=i.useState({show:!1}),b=()=>{if(!L(n)){r({show:!0,msg:"Please map all required fields to continue."});return}_(e,s,u,n,f,o,1)};return t.jsxs("div",{style:{width:900},children:[t.jsx(F,{snack:j,setSnackbar:r}),t.jsxs("div",{className:"flx mt-3",children:[t.jsx("b",{className:"wdt-200 d-in-b",children:p("Integration Name:")}),t.jsx("input",{className:"btcd-paper-inp w-5",onChange:C=>y(C,n,m),name:"name",value:n.name,type:"text",placeholder:p("Integration Name...")})]}),t.jsx("br",{}),t.jsx("br",{}),t.jsx(E,{formID:x,formFields:a,fluentCrmConf:n,setFluentCrmConf:m,isLoading:h,step:2,setisLoading:g,setSnackbar:r}),t.jsx(k,{edit:!0,saveConfig:b,disabled:n.list_id===""||n.field_map.length<1}),t.jsx("br",{})]})}export{B as default};
