import{h as p,$ as j,g as _,k as w,i as C,j as t,_ as i}from"./main.2.9.0.js";import{u as I,b as n}from"./react-router.DMwpH23k.js";import{S}from"./SnackMsg.DYSD96P4.js";import{S as v,I as y,s as F}from"./Integrations.DL8wqGct.js";import{h as N,c}from"./BentoCommonFunc.CJLWv-Tr.js";import{B as k}from"./BentoIntegLayout.DY_P3xri.js";import"./react-vendor.P7K3d6op.js";import"./Note.NSUdvR3c.js";import"./CopyIcn.CEA_lFLo.js";import"./Table.BfF8RYFZ.js";import"./index.DpWdl9V1.js";import"./ProUtilHelpers.CHf_DzPf.js";import"./ActionProFeatureLabels.gUp7_RXn.js";import"./CustomFieldKey.iFz21-av.js";import"./TagifyInput.KPPRQJ1B.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};
