import{b as f,h as w,$ as C,k as S,i as _,j as t,_ as r}from"./main.2.8.1.js";import{u as v,h as y,d as m}from"./react-router-dom.9mCuUg3q.js";import{S as N}from"./SnackMsg.S8DrwLlT.js";import"./Note.BeM7sN-p.js";import{S as R,I as k,s as F}from"./Integrations.D2bgBas2.js";import{h as u,c as E}from"./ZohoRecruitCommonFunc.DFWLUnzn.js";import{Z as $}from"./ZohoRecruitIntegLayout.J_urg0QB.js";import"./CopyIcn.3gZpHton.js";import"./Table.DAL7rcPQ.js";import"./index.wO-AxluA.js";import"./TabPanel.VqazfIFY.js";import"./TagifyInput.Cu0YIRbG.js";import"./tagify.YxUZd8Ix.js";function O({allIntegURL:g}){const h=v(),{id:L,formID:d}=y(),[e,a]=f(w),[c,x]=f(C),[l,o]=m.useState(!1),[b,s]=m.useState({show:!1}),[i,j]=m.useState(0),p=S(_),I=()=>{if(!E(e)){s({show:!0,msg:r("Please map mandatory fields","bit-integrations")});return}F({flow:c,setFlow:x,allIntegURL:g,conf:e,navigate:h,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:c.triggered_entity,setSnackbar:s}),t.jsx($,{tab:i,settab:j,formID:d,formFields:p,handleInput:n=>u(n,i,e,a,d,o,s),recruitConf:e,setRecruitConf:a,isLoading:l,setIsLoading:o,setSnackbar:s}),t.jsx(k,{edit:!0,saveConfig:I,disabled:e.module===""||e.field_map.length<1,isLoading:l,dataConf:e,setDataConf:a,formFields:p}),t.jsx("br",{})]})}export{O as default};
