import{b as c,h as b,$ as I,k as C,i as _,j as t,_ as p}from"./main.2.8.1.js";import{u as v,h as w,d as g}from"./react-router-dom.9mCuUg3q.js";import{S}from"./SnackMsg.S8DrwLlT.js";import"./Note.BeM7sN-p.js";import{S as N,I as y,s as k}from"./Integrations.D2bgBas2.js";import{h as l}from"./GroundhoggCommonFunc.IzYgFdLJ.js";import{G as E}from"./GroundhoggIntegLayout.DyQiMovO.js";import"./CopyIcn.3gZpHton.js";import"./Table.DAL7rcPQ.js";import"./index.wO-AxluA.js";import"./TitleModal.OGRirA3t.js";import"./EditIcn.VNtuoqcJ.js";import"./TagifyInput.Cu0YIRbG.js";import"./tagify.YxUZd8Ix.js";function J({allIntegURL:f}){var d;const u=v(),{formID:x}=w(),[s,o]=c(b),[i,F]=c(I),r=C(_),[a,m]=g.useState(!1),[h,e]=g.useState({show:!1}),j=!(s.mainAction==="2"&&s.addTagToUser!==void 0);return t.jsxs("div",{style:{width:900},children:[t.jsx(S,{snack:h,setSnackbar:e}),t.jsxs("div",{className:"flx mt-3",children:[t.jsx("b",{className:"wdt-200 d-in-b",children:p("Integration Name:","bit-integrations")}),t.jsx("input",{className:"btcd-paper-inp w-5",onChange:n=>l(n,s,o),name:"name",value:s.name,type:"text",placeholder:p("Integration Name...","bit-integrations")})]}),t.jsx("br",{}),t.jsx("br",{}),t.jsx(N,{entity:i.triggered_entity,setSnackbar:e}),t.jsx(E,{formID:x,formFields:r,handleInput:n=>l(n,s,o),groundhoggConf:s,setGroundhoggConf:o,isLoading:a,setIsLoading:m,setSnackbar:e}),t.jsx(y,{edit:!0,saveConfig:()=>k({flow:i,allIntegURL:f,conf:s,navigate:u,edit:1,setIsLoading:m,setSnackbar:e}),disabled:(s.mainAction==="2"?j:!(((d=s.field_map)==null?void 0:d.length)>=1))||a,isLoading:a,dataConf:s,setDataConf:o,formFields:r}),t.jsx("br",{})]})}export{J as default};
