import{h as d,$ as S,g as b,k as j,i as y,j as e,_ as a,q as _}from"./main.2.8.10.js";import{u as w,b as o}from"./react-router.DMwpH23k.js";import{S as C}from"./SnackMsg.7BjcJK1j.js";import"./Note.DalStCGz.js";import"./CopyIcn.BnhKHfEP.js";import{S as v,I as F,s as N}from"./Integrations.BFhED4ck.js";import{h as k,c as l}from"./SystemeIOCommonFunc.2ZaTIeGf.js";import{S as E}from"./SystemeIOIntegLayout.DWb1OgDR.js";import"./react-vendor.P7K3d6op.js";import"./Table.DSsAy4VI.js";import"./index.DpWdl9V1.js";function G({allIntegURL:c}){const f=w(),[i,L]=d(S),[t,n]=d(b),[g,r]=o.useState(!1),[p,x]=o.useState({}),[u,s]=o.useState({show:!1}),m=j(y),h=()=>{if(!l(t)){s({show:!0,msg:a("Please map mandatory fields","bit-integrations")});return}if(!t.selectedTag){_.error(a("Please select a Tag","bit-integrations"));return}N({flow:i,allIntegURL:c,conf:t,navigate:f,edit:1,setIsLoading:r,setSnackbar:s})};return e.jsxs("div",{style:{width:900},children:[e.jsx(C,{snack:u,setSnackbar:s}),e.jsxs("div",{className:"flx mt-3",children:[e.jsx("b",{className:"wdt-200 d-in-b",children:a("Integration Name:","bit-integrations")}),e.jsx("input",{className:"btcd-paper-inp w-5",onChange:I=>k(I,t,n),name:"name",value:t.name,type:"text",placeholder:a("Integration Name...","bit-integrations")})]}),e.jsx("br",{}),e.jsx(v,{entity:i.triggered_entity,setSnackbar:s}),e.jsx(E,{formID:i.triggered_entity_id,formFields:m,systemeIOConf:t,setSystemeIOConf:n,loading:p,setLoading:x,setIsLoading:r,setSnackbar:s}),e.jsx(F,{edit:!0,saveConfig:h,disabled:!l(t),isLoading:g,dataConf:t,setDataConf:n,formFields:m}),e.jsx("br",{})]})}export{G as default};
