import{h as f,g as w,$ as C,k as S,i as _,j as t,_ as r}from"./main.2.9.0.js";import{u as v,e as y,b as m}from"./react-router.DMwpH23k.js";import{S as N}from"./SnackMsg.DYSD96P4.js";import"./Note.NSUdvR3c.js";import"./CopyIcn.CEA_lFLo.js";import{S as R,I as k,s as F}from"./Integrations.DL8wqGct.js";import{h as u,c as E}from"./ZohoRecruitCommonFunc.CO_rNZGH.js";import{Z as $}from"./ZohoRecruitIntegLayout.8-cF35L4.js";import"./react-vendor.P7K3d6op.js";import"./Table.BfF8RYFZ.js";import"./index.DpWdl9V1.js";import"./TabPanel.BxisqkXJ.js";import"./TagifyInput.KPPRQJ1B.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};
