import{h as f,g as w,$ as C,k as S,i as _,j as t,_ as r}from"./main.2.8.10.js";import{u as v,e as y,b as m}from"./react-router.DMwpH23k.js";import{S as N}from"./SnackMsg.7BjcJK1j.js";import"./Note.DalStCGz.js";import"./CopyIcn.BnhKHfEP.js";import{S as R,I as k,s as F}from"./Integrations.BFhED4ck.js";import{h as u,c as E}from"./ZohoRecruitCommonFunc.-3DP77_F.js";import{Z as $}from"./ZohoRecruitIntegLayout.CqWWzUjb.js";import"./react-vendor.P7K3d6op.js";import"./Table.DSsAy4VI.js";import"./index.DpWdl9V1.js";import"./TabPanel.B3Zpgnvr.js";import"./TagifyInput.C4ilRm4k.js";import"./lodash.DCvQBX3r.js";function Q({allIntegURL:g}){const x=v(),{id:L,formID:c}=y(),[e,a]=f(w),[d,h]=f(C),[p,o]=m.useState(!1),[b,s]=m.useState({show:!1}),[i,j]=m.useState(0),l=S(_),I=()=>{if(!E(e)){s({show:!0,msg:r("Please map mandatory fields","bit-integrations")});return}F({flow:d,setFlow:h,allIntegURL:g,conf:e,navigate:x,edit:1,setIsLoading:o,setSnackbar:s})};return t.jsxs("div",{style:{width:900},children:[t.jsx(N,{snack:b,setSnackbar:s}),t.jsxs("div",{className:"flx mt-3",children:[t.jsx("b",{className:"wdt-200 d-in-b",children:r("Integration Name:","bit-integrations")}),t.jsx("input",{className:"btcd-paper-inp w-5",onChange:n=>u(n,i,e,a),name:"name",value:e.name,type:"text",placeholder:r("Integration Name...","bit-integrations")})]}),t.jsx("br",{}),t.jsx(R,{entity:d.triggered_entity,setSnackbar:s}),t.jsx($,{tab:i,settab:j,formID:c,formFields:l,handleInput:n=>u(n,i,e,a,c,o,s),recruitConf:e,setRecruitConf:a,isLoading:p,setIsLoading:o,setSnackbar:s}),t.jsx(k,{edit:!0,saveConfig:I,disabled:e.module===""||e.field_map.length<1,isLoading:p,dataConf:e,setDataConf:a,formFields:l}),t.jsx("br",{})]})}export{Q as default};
