var S=Object.defineProperty;var c=Object.getOwnPropertySymbols;var v=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var l=(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)&&l(a,e,s[e]);if(c)for(var e of c(s))N.call(s,e)&&l(a,e,s[e]);return a};import{G as w,g as C,r as i,j as t,S as k,_ as u}from"./main-343.js";import{a7 as y}from"./bf-659-81.js";import{I as A}from"./bf-58-184.js";import{h as _,A as E,c as L}from"./bf-218-219.js";import"./bf-974-82.js";import"./bf-649-79.js";import"./bf-594-113.js";function z({allIntegURL:a,formFields:s,integrations:e,setIntegration:f}){const x=w(),{id:r,formID:g}=C(),[n,m]=i.useState(p({},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{z as default};
