import{b as l,$ as u,h,k as b,i as j,j as t,_ as n,z as _}from"./main.2.8.1.js";import{u as I,d as p}from"./react-router-dom.9mCuUg3q.js";import"./Note.BeM7sN-p.js";import{S as C,I as w,s as v}from"./Integrations.D2bgBas2.js";import{h as c,G as y,c as F}from"./GetgistIntegLayout.TsGpEwax.js";import"./CopyIcn.3gZpHton.js";import"./SnackMsg.S8DrwLlT.js";import"./Table.DAL7rcPQ.js";import"./index.wO-AxluA.js";import"./TagifyInput.Cu0YIRbG.js";import"./tagify.YxUZd8Ix.js";function T({allIntegURL:f}){const g=I(),[a,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:a,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:i=>c(i,e,s),name:"name",value:e.name,type:"text",placeholder:n("Integration Name...","bit-integrations")})]}),t.jsx("br",{}),t.jsx(C,{entity:a.triggered_entity,setSnackbar:d}),t.jsx(y,{formID:a.triggered_entity_id,formFields:m,handleInput:i=>c(i,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{T as default};
