var S=Object.defineProperty;var p=Object.getOwnPropertySymbols;var v=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var c=(a,s,e)=>s in a?S(a,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[s]=e,l=(a,s)=>{for(var e in s||(s={}))v.call(s,e)&&c(a,e,s[e]);if(p)for(var e of p(s))N.call(s,e)&&c(a,e,s[e]);return a};import{D as w,g as C,r as i,j as t,S as k,_ as u}from"./main-634.js";import{a7 as y}from"./bf-746-82.js";import{I as A}from"./bf-942-184.js";import{h as _,A as E,c as L}from"./bf-774-219.js";import"./bf-275-83.js";import"./bf-822-108.js";import"./bf-25-81.js";import"./bf-438-114.js";function G({allIntegURL:a,formFields:s,integrations:e,setIntegration:f}){const x=w(),{id:r,formID:g}=C(),[n,m]=i.useState(l({},e[r])),[d,h]=i.useState(!1),[j,o]=i.useState({show:!1}),I=()=>{if(!L(n)){o({show:!0,msg:"Please map all required fields to continue."});return}y(e,f,a,n,x,r,1)};return t.jsxs("div",{style:{width:900},children:[t.jsx(k,{snack:j,setSnackbar:o}),t.jsxs("div",{className:"flx mt-3",children:[t.jsx("b",{className:"wdt-200 d-in-b",children:u("Integration Name:")}),t.jsx("input",{className:"btcd-paper-inp w-5",onChange:b=>_(b,n,m),name:"name",value:n.name,type:"text",placeholder:u("Integration Name...")})]}),t.jsx("br",{}),t.jsx("br",{}),t.jsx(E,{formID:g,formFields:s,autonamiConf:n,setAutonamiConf:m,isLoading:d,step:2,setIsLoading:h,setSnackbar:o}),t.jsx(A,{edit:!0,saveConfig:I,disabled:n.field_map.length<1,isLoading:d}),t.jsx("br",{})]})}export{G as default};
