import{b as p,$ as j,h as _,k as w,i as C,j as t,_ as i}from"./main.2.8.1.js";import{u as I,d as n}from"./react-router-dom.9mCuUg3q.js";import{S}from"./SnackMsg.S8DrwLlT.js";import{S as v,I as y,s as F}from"./Integrations.D2bgBas2.js";import{h as N,c}from"./BentoCommonFunc.Deih24CN.js";import{B as k}from"./BentoIntegLayout.DifJ4cfG.js";import"./Note.BeM7sN-p.js";import"./CopyIcn.3gZpHton.js";import"./Table.DAL7rcPQ.js";import"./index.wO-AxluA.js";import"./ProUtilHelpers.fQlR3mWW.js";import"./ActionProFeatureLabels.CuihmlQ8.js";import"./CustomFieldKey.V0UvzBSi.js";import"./TagifyInput.Cu0YIRbG.js";import"./tagify.YxUZd8Ix.js";function O({allIntegURL:l}){const f=I(),[o,B]=p(j),[e,a]=p(_),[r,m]=n.useState(!1),[g,x]=n.useState({}),[u,s]=n.useState({show:!1}),d=w(C),h=()=>{if(!c(e)){s({show:!0,msg:i("Please map mandatory fields","bit-integrations")});return}F({flow:o,allIntegURL:l,conf:e,navigate:f,edit:1,setIsLoading:m,setSnackbar:s})};return t.jsxs("div",{style:{width:900},children:[t.jsx(S,{snack:u,setSnackbar:s}),t.jsxs("div",{className:"flx mt-3",children:[t.jsx("b",{className:"wdt-200 d-in-b",children:i("Integration Name:","bit-integrations")}),t.jsx("input",{className:"btcd-paper-inp w-5",onChange:b=>N(b,e,a),name:"name",value:e.name,type:"text",placeholder:i("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:d,bentoConf:e,setBentoConf:a,loading:g,setLoading:x,isLoading:r,setIsLoading:m,setSnackbar:s}),t.jsx(y,{edit:!0,saveConfig:h,disabled:!c(e),isLoading:r,dataConf:e,setDataConf:a,formFields:d}),t.jsx("br",{})]})}export{O as default};
