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,c=(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{G as N,g as w,r as i,j as t,S as F,_ as p}from"./main-343.js";import{a7 as _}from"./bf-659-81.js";import{I as k}from"./bf-58-184.js";import{h as y,F as E,c as L}from"./bf-48-217.js";import"./bf-974-82.js";import"./bf-649-79.js";import"./bf-594-113.js";function A({formFields:a,setIntegration:s,integrations:e,allIntegURL:u}){const f=N(),{id:o,formID:x}=w(),[n,m]=i.useState(c({},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:p("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:p("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{A as default};
