var w=Object.defineProperty;var f=Object.getOwnPropertySymbols;var y=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable;var h=(a,t,e)=>t in a?w(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e,x=(a,t)=>{for(var e in t||(t={}))y.call(t,e)&&h(a,e,t[e]);if(f)for(var e of f(t))C.call(t,e)&&h(a,e,t[e]);return a};import{G as k,g as R,r as n,j as s,S as _,_ as d}from"./main-343.js";import{a7 as E}from"./bf-659-81.js";import{I as L}from"./bf-58-184.js";import{h as g,c as Z}from"./bf-989-101.js";import{Z as M}from"./bf-502-195.js";import"./bf-974-82.js";import"./bf-649-79.js";import"./bf-594-113.js";function H({formFields:a,setIntegration:t,integrations:e,allIntegURL:j}){const b=k(),{id:p,formID:l}=R(),[o,i]=n.useState(x({},e[p])),[I,u]=n.useState(!1),[S,r]=n.useState({show:!1}),[m,v]=n.useState(0),N=()=>{if(!Z(o)){r({show:!0,msg:d("Please map mandatory fields")});return}E(e,t,j,o,b,p,1)};return s.jsxs("div",{style:{width:900},children:[s.jsx(_,{snack:S,setSnackbar:r}),s.jsxs("div",{className:"flx mt-3",children:[s.jsx("b",{className:"wdt-100 d-in-b",children:d("Integration Name:")}),s.jsx("input",{className:"btcd-paper-inp w-7",onChange:c=>g(c,m,o,i),name:"name",value:o.name,type:"text",placeholder:d("Integration Name...")})]}),s.jsx("br",{}),s.jsx("br",{}),s.jsx(M,{tab:m,settab:v,formID:l,formFields:a,handleInput:c=>g(c,m,o,i,l,u,r),recruitConf:o,setRecruitConf:i,isLoading:I,setisLoading:u,setSnackbar:r}),s.jsx(L,{edit:!0,saveConfig:N,disabled:o.module===""||o.field_map.length<1}),s.jsx("br",{})]})}export{H as default};
