import{h as f,$ as j,g as _,k as I,i as w,j as t,_ as n}from"./main.2.9.0.js";import{u as C,b as r}from"./react-router.DMwpH23k.js";import{S}from"./SnackMsg.DYSD96P4.js";import"./Note.NSUdvR3c.js";import"./CopyIcn.CEA_lFLo.js";import{S as v,I as y,s as F}from"./Integrations.DL8wqGct.js";import{h as p,c as N}from"./VboutCommonFunc.3gmsaleD.js";import{V as k}from"./VboutIntegLayout._Y1snnr6.js";import"./react-vendor.P7K3d6op.js";import"./Table.BfF8RYFZ.js";import"./index.DpWdl9V1.js";import"./TagifyInput.KPPRQJ1B.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};
