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