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,p=(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{D as N,g as P,r as n,j as t,S as w,_ as c}from"./main-634.js";import{a7 as C}from"./bf-746-82.js";import{I as k}from"./bf-942-184.js";import{h as y,M as _,c as E}from"./bf-323-212.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:r,formID:x}=P(),[i,l]=n.useState(p({},e[r])),[g,h]=n.useState(!1),[j,o]=n.useState({show:!1}),b=()=>{if(!E(i)){o({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:o}),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-6",onChange:I=>y(I,i,l),name:"name",value:i.name,type:"text",placeholder:c("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:o,edit:i.lists}),t.jsx(k,{edit:!0,saveConfig:b,disabled:i.lists===""||i.field_map.length<1}),t.jsx("br",{})]})}export{G as default};
