import{h as m,$ as j,g as b,k,i as w,j as t,_ as a}from"./main.2.8.10.js";import{u as C,b as n}from"./react-router.DMwpH23k.js";import{S as I}from"./SnackMsg.7BjcJK1j.js";import{S as _,I as v,s as F}from"./Integrations.BFhED4ck.js";import{Z as y}from"./ZendeskSupportIntegLayout.SuGYW0c2.js";import{h as N,c as p}from"./ZendeskSupportCommonFunc.Z63BtkwO.js";import"./react-vendor.P7K3d6op.js";import"./Note.DalStCGz.js";import"./CopyIcn.BnhKHfEP.js";import"./Table.DSsAy4VI.js";import"./index.DpWdl9V1.js";import"./ProUtilHelpers.CtRYkgop.js";import"./TagifyInput.C4ilRm4k.js";import"./lodash.DCvQBX3r.js";import"./GlobalIntegrationHelper.Belqr4OT.js";import"./ActionProFeatureLabels.BzMNdAoD.js";function O({allIntegURL:d}){const c=C(),[i,l]=m(j),[e,o]=m(b),[f,E]=n.useState(!1),[g,u]=n.useState({}),[x,s]=n.useState({show:!1}),r=k(w),h=()=>{if(!p(e)){s({show:!0,msg:a("Please map mandatory fields","bit-integrations")});return}F({flow:i,setFlow:l,allIntegURL:d,conf:e,navigate:c,edit:1,setSnackbar:s})};return t.jsxs("div",{style:{width:900},children:[t.jsx(I,{snack:x,setSnackbar:s}),t.jsxs("div",{className:"flx mt-3",children:[t.jsx("b",{className:"wdt-200 d-in-b",children:a("Integration Name:","bit-integrations")}),t.jsx("input",{className:"btcd-paper-inp w-5",onChange:S=>N(S,e,o),name:"name",value:e.name,type:"text",placeholder:a("Integration Name...","bit-integrations")})]}),t.jsx("br",{}),t.jsx(_,{entity:i.triggered_entity,setSnackbar:s}),t.jsx(y,{formFields:r,zendeskSupportConf:e,setZendeskSupportConf:o,loading:g,setLoading:u,setSnackbar:s}),t.jsx(v,{edit:!0,saveConfig:h,disabled:!p(e),isLoading:f,dataConf:e,setDataConf:o,formFields:r}),t.jsx("br",{})]})}export{O as default};
