import{h as p,$ as j,g as _,k as w,i as C,j as t,_ as i}from"./main.2.8.10.js";import{u as I,b as n}from"./react-router.DMwpH23k.js";import{S}from"./SnackMsg.7BjcJK1j.js";import{S as v,I as y,s as F}from"./Integrations.BFhED4ck.js";import{h as N,c}from"./BentoCommonFunc.DpgW-Asb.js";import{B as k}from"./BentoIntegLayout.inlRUKTw.js";import"./react-vendor.P7K3d6op.js";import"./Note.DalStCGz.js";import"./CopyIcn.BnhKHfEP.js";import"./Table.DSsAy4VI.js";import"./index.DpWdl9V1.js";import"./ProUtilHelpers.CtRYkgop.js";import"./ActionProFeatureLabels.BzMNdAoD.js";import"./CustomFieldKey.DXUNVoDV.js";import"./TagifyInput.C4ilRm4k.js";import"./lodash.DCvQBX3r.js";function Q({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{Q as default};
