import{h as l,$ as u,g as h,k as b,i as j,j as t,_ as n,z as _}from"./main.2.8.10.js";import{u as I,b as p}from"./react-router.DMwpH23k.js";import"./Note.DalStCGz.js";import"./CopyIcn.BnhKHfEP.js";import{S as C,I as w,s as v}from"./Integrations.BFhED4ck.js";import{h as c,G as y,c as F}from"./GetgistIntegLayout.Uu0Esng3.js";import"./react-vendor.P7K3d6op.js";import"./SnackMsg.7BjcJK1j.js";import"./Table.DSsAy4VI.js";import"./index.DpWdl9V1.js";import"./TagifyInput.C4ilRm4k.js";import"./lodash.DCvQBX3r.js";function q({allIntegURL:f}){const g=I(),[i,N]=l(u),[e,s]=l(h),[o,r]=p.useState(!1),[S,d]=p.useState({show:!1}),m=b(j),x=()=>{if(!F(e)){_.error(n("Please map mandatory fields","bit-integrations"));return}v({flow:i,allIntegURL:f,conf:e,navigate:g,edit:1,setIsLoading:r,setSnackbar:d})};return t.jsxs("div",{style:{width:900},children:[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:a=>c(a,e,s),name:"name",value:e.name,type:"text",placeholder:n("Integration Name...","bit-integrations")})]}),t.jsx("br",{}),t.jsx(C,{entity:i.triggered_entity,setSnackbar:d}),t.jsx(y,{formID:i.triggered_entity_id,formFields:m,handleInput:a=>c(a,e,s),getgistConf:e,setGetgistConf:s,isLoading:o,setIsLoading:r}),t.jsx(w,{edit:!0,saveConfig:x,disabled:e.field_map.length<1,isLoading:o,dataConf:e,setDataConf:s,formFields:m}),t.jsx("br",{})]})}export{q as default};
