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{D as k,g as R,r as n,j as s,S as _,_ as d}from"./main-634.js";import{a7 as E}from"./bf-746-82.js";import{I as L}from"./bf-942-184.js";import{h as g,c as Z}from"./bf-56-99.js";import{Z as D}from"./bf-518-195.js";import"./bf-275-83.js";import"./bf-822-108.js";import"./bf-25-81.js";import"./bf-438-114.js";function J({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(D,{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{J as default};
