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