import{h as m,g as u,$ as h,k as j,i as b,j as s,_ as c}from"./main.2.8.10.js";import{u as _,e as F,b as d}from"./react-router.DMwpH23k.js";import{S as w}from"./SnackMsg.7BjcJK1j.js";import"./Note.DalStCGz.js";import"./CopyIcn.BnhKHfEP.js";import{S as I,I as S,s as v}from"./Integrations.BFhED4ck.js";import{F as k}from"./FreshdeskIntegLayout.BI6sk_bu.js";import{h as y,c as C,a as N}from"./FreshdeskCommonFunc.BBcgq9uB.js";import"./react-vendor.P7K3d6op.js";import"./Table.DSsAy4VI.js";import"./index.DpWdl9V1.js";import"./TagifyInput.C4ilRm4k.js";import"./lodash.DCvQBX3r.js";function J({allIntegURL:p}){const l=_(),{formID:x}=F(),[t,a]=m(u),[o,E]=m(h),n=j(b),[i,r]=d.useState(!1),[f,e]=d.useState({show:!1});return s.jsxs("div",{style:{width:900},children:[s.jsx(w,{snack:f,setSnackbar:e}),s.jsxs("div",{className:"flx mt-3",children:[s.jsx("b",{className:"wdt-200 d-in-b",children:c("Integration Name:","bit-integrations")}),s.jsx("input",{className:"btcd-paper-inp w-5",onChange:g=>y(g,t,a),name:"name",value:t.name,type:"text",placeholder:c("Integration Name...","bit-integrations")})]}),s.jsx("br",{}),s.jsx("br",{}),s.jsx(I,{entity:o.triggered_entity,setSnackbar:e}),s.jsx(k,{formID:x,formFields:n,freshdeskConf:t,setFreshdeskConf:a,isLoading:i,setIsLoading:r,setSnackbar:e}),s.jsx(S,{edit:!0,saveConfig:()=>v({flow:o,allIntegURL:p,conf:t,navigate:l,edit:1,setIsLoading:r,setSnackbar:e}),disabled:!t.priority||!t.status||!C(t==null?void 0:t.field_map)||t.contactShow&&!N(t==null?void 0:t.field_map_contact)||i,isLoading:i,dataConf:t,setDataConf:a,formFields:n}),s.jsx("br",{})]})}export{J as default};
