import{b as d,$ as j,h as N,k as _,i as w,j as t,_ as n}from"./main.2.8.1.js";import{u as C,d as o}from"./react-router-dom.9mCuUg3q.js";import{S as I}from"./SnackMsg.S8DrwLlT.js";import"./Note.BeM7sN-p.js";import{S,I as v,s as y}from"./Integrations.D2bgBas2.js";import{h as F,c as l}from"./NimbleCommonFunc.CVIjJfHy.js";import{N as k}from"./NimbleIntegLayout.Ui3ud2i-.js";import"./CopyIcn.3gZpHton.js";import"./Table.DAL7rcPQ.js";import"./index.wO-AxluA.js";function B({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{B as default};
