var I=Object.defineProperty;var l=Object.getOwnPropertySymbols;var S=Object.prototype.hasOwnProperty,v=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,p=(a,s)=>{for(var e in s||(s={}))S.call(s,e)&&d(a,e,s[e]);if(l)for(var e of l(s))v.call(s,e)&&d(a,e,s[e]);return a};import{D as N,g as w,r as i,j as t,S as F,_ as c}from"./main-634.js";import{a7 as _}from"./bf-746-82.js";import{I as k}from"./bf-942-184.js";import{h as y,F as E,c as L}from"./bf-812-217.js";import"./bf-275-83.js";import"./bf-822-108.js";import"./bf-25-81.js";import"./bf-438-114.js";function G({formFields:a,setIntegration:s,integrations:e,allIntegURL:u}){const f=N(),{id:o,formID:x}=w(),[n,m]=i.useState(p({},e[o])),[g,h]=i.useState(!1),[j,r]=i.useState({show:!1}),C=()=>{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:c("Integration Name:")}),t.jsx("input",{className:"btcd-paper-inp w-5",onChange:b=>y(b,n,m),name:"name",value:n.name,type:"text",placeholder:c("Integration Name...")})]}),t.jsx("br",{}),t.jsx("br",{}),t.jsx(E,{formID:x,formFields:a,fluentCrmConf:n,setFluentCrmConf:m,isLoading:g,step:2,setisLoading:h,setSnackbar:r}),t.jsx(k,{edit:!0,saveConfig:C,disabled:n.list_id===""||n.field_map.length<1}),t.jsx("br",{})]})}export{G as default};
