var S=Object.defineProperty;var m=Object.getOwnPropertySymbols;var v=Object.prototype.hasOwnProperty,M=Object.prototype.propertyIsEnumerable;var d=(a,s,e)=>s in a?S(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(m)for(var e of m(s))M.call(s,e)&&d(a,e,s[e]);return a};import{G as N,g as P,r as o,j as t,S as w,_ as p}from"./main-343.js";import{a7 as C}from"./bf-659-81.js";import{I as k}from"./bf-58-184.js";import{h as y,M as _,c as E}from"./bf-857-212.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:r,formID:x}=P(),[i,l]=o.useState(c({},e[r])),[g,h]=o.useState(!1),[j,n]=o.useState({show:!1}),b=()=>{if(!E(i)){n({show:!0,msg:"Please map all required fields to continue."});return}C(e,s,u,i,f,r,1)};return t.jsxs("div",{style:{width:900},children:[t.jsx(w,{snack:j,setSnackbar:n}),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-6",onChange:I=>y(I,i,l),name:"name",value:i.name,type:"text",placeholder:p("Integration Name...")})]}),t.jsx("br",{}),t.jsx("br",{}),t.jsx(_,{formID:x,formFields:a,mailPoetConf:i,setMailPoetConf:l,isLoading:g,step:2,setisLoading:h,setSnackbar:n,edit:i.lists}),t.jsx(k,{edit:!0,saveConfig:b,disabled:i.lists===""||i.field_map.length<1}),t.jsx("br",{})]})}export{A as default};
