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