import{h as f,$ as j,g as _,k as I,i as w,j as t,_ as n}from"./main.2.8.10.js";import{u as C,b as r}from"./react-router.DMwpH23k.js";import{S}from"./SnackMsg.7BjcJK1j.js";import"./Note.DalStCGz.js";import"./CopyIcn.BnhKHfEP.js";import{S as v,I as y,s as F}from"./Integrations.BFhED4ck.js";import{h as p,c as N}from"./VboutCommonFunc.Bcusx1Hb.js";import{V as k}from"./VboutIntegLayout.CXOniNb3.js";import"./react-vendor.P7K3d6op.js";import"./Table.DSsAy4VI.js";import"./index.DpWdl9V1.js";import"./TagifyInput.C4ilRm4k.js";import"./lodash.DCvQBX3r.js";function H({allIntegURL:c}){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:c,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=>p(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=>p(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{H as default};
