import{u as b,k as I,d as c,h as C,r as g,j as t}from"./main-406.js";import{g as _,$ as v,h as w,d as N,_ as l,i as S,I as y,s as k}from"./bi.394.85.js";import{h as f}from"./bi.158.792.js";import{G as E}from"./bi.884.793.js";import"./bi.285.720.js";import"./bi.840.704.js";import"./bi.704.707.js";import"./bi.701.708.js";function P({allIntegURL:p}){var m;const u=b(),{formID:x}=I(),[s,e]=c(_),[i,F]=c(v),r=C(w),[n,d]=g.useState(!1),[h,a]=g.useState({show:!1}),j=!(s.mainAction==="2"&&s.addTagToUser!==void 0);return t.jsxs("div",{style:{width:900},children:[t.jsx(N,{snack:h,setSnackbar:a}),t.jsxs("div",{className:"flx mt-3",children:[t.jsx("b",{className:"wdt-200 d-in-b",children:l("Integration Name:","bit-integrations")}),t.jsx("input",{className:"btcd-paper-inp w-5",onChange:o=>f(o,s,e),name:"name",value:s.name,type:"text",placeholder:l("Integration Name...","bit-integrations")})]}),t.jsx("br",{}),t.jsx("br",{}),t.jsx(S,{entity:i.triggered_entity,setSnackbar:a}),t.jsx(E,{formID:x,formFields:r,handleInput:o=>f(o,s,e),groundhoggConf:s,setGroundhoggConf:e,isLoading:n,setIsLoading:d,setSnackbar:a}),t.jsx(y,{edit:!0,saveConfig:()=>k({flow:i,allIntegURL:p,conf:s,navigate:u,edit:1,setIsLoading:d,setSnackbar:a}),disabled:(s.mainAction==="2"?j:!(((m=s.field_map)==null?void 0:m.length)>=1))||n,isLoading:n,dataConf:s,setDataConf:e,formFields:r}),t.jsx("br",{})]})}export{P as default};
