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.9.0.js";import{u as I,b as p}from"./react-router.DMwpH23k.js";import"./Note.NSUdvR3c.js";import"./CopyIcn.CEA_lFLo.js";import{S as C,I as w,s as v}from"./Integrations.DL8wqGct.js";import{h as c,G as y,c as F}from"./GetgistIntegLayout.Bhn8hs2R.js";import"./react-vendor.P7K3d6op.js";import"./SnackMsg.DYSD96P4.js";import"./Table.BfF8RYFZ.js";import"./index.DpWdl9V1.js";import"./TagifyInput.KPPRQJ1B.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};
