import{b as f,$ as j,h as _,k as I,i as w,j as t,_ as n}from"./main.2.8.1.js";import{u as C,d as r}from"./react-router-dom.9mCuUg3q.js";import{S}from"./SnackMsg.S8DrwLlT.js";import"./Note.BeM7sN-p.js";import{S as v,I as y,s as F}from"./Integrations.D2bgBas2.js";import{h as c,c as N}from"./VboutCommonFunc.Gg1p24p6.js";import{V as k}from"./VboutIntegLayout.B6kNgmkf.js";import"./CopyIcn.3gZpHton.js";import"./Table.DAL7rcPQ.js";import"./index.wO-AxluA.js";import"./TagifyInput.Cu0YIRbG.js";import"./tagify.YxUZd8Ix.js";function G({allIntegURL:p}){const g=C(),[o,E]=f(j),[e,a]=f(_),[d,m]=r.useState(!1),[u,x]=r.useState({list:!1,field:!1,auth:!1}),[h,s]=r.useState({show:!1}),l=I(w),b=()=>{if(!N(e)){s({show:!0,msg:n("Please map mandatory fields","bit-integrations")});return}F({flow:o,allIntegURL:p,conf:e,navigate:g,edit:1,setIsLoading:m,setSnackbar:s})};return t.jsxs("div",{style:{width:900},children:[t.jsx(S,{snack:h,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:i=>c(i,e,a),name:"name",value:e.name,type:"text",placeholder:n("Integration Name...","bit-integrations")})]}),t.jsx("br",{}),t.jsx(v,{entity:o.triggered_entity,setSnackbar:s}),t.jsx(k,{formID:o.triggered_entity_id,formFields:l,handleInput:i=>c(i,e,a),vboutConf:e,setVboutConf:a,isLoading:d,setIsLoading:m,loading:u,setLoading:x,setSnackbar:s}),t.jsx(y,{edit:!0,saveConfig:b,disabled:e.field_map.length<1,isLoading:d,dataConf:e,setDataConf:a,formFields:l}),t.jsx("br",{})]})}export{G as default};
