import{h as d,$ as S,g as j,k as b,i as _,j as t,_ as o}from"./main.2.9.0.js";import{u as I,e as w,b as r}from"./react-router.DMwpH23k.js";import{S as C}from"./SnackMsg.DYSD96P4.js";import"./Note.NSUdvR3c.js";import"./CopyIcn.CEA_lFLo.js";import{S as v,I as y,s as F}from"./Integrations.DL8wqGct.js";import{h as l,c as N}from"./OmniSendCommonFunc.OmkbczZH.js";import{O as k}from"./OmniSendIntegLayout.BYTAuU3L.js";import"./react-vendor.P7K3d6op.js";import"./Table.BfF8RYFZ.js";import"./index.DpWdl9V1.js";import"./ActionProFeatureComponent.FrU20tzT.js";import"./ActionProFeatureLabels.gUp7_RXn.js";import"./TagifyInput.KPPRQJ1B.js";import"./lodash.DCvQBX3r.js";function U({allIntegURL:f}){const p=I(),{id:E}=w(),[i,L]=d(S),[e,a]=d(j),[c,O]=r.useState(!1),[g,u]=r.useState({list:!1,field:!1,auth:!1,group:!1}),[x,s]=r.useState({show:!1}),m=b(_),h=()=>{if(!N(e)){s({show:!0,msg:o("Please map mandatory fields","bit-integrations")});return}F({flow:i,allIntegURL:f,conf:e,navigate:p,edit:1,setSnackbar:s})};return t.jsxs("div",{style:{width:900},children:[t.jsx(C,{snack:x,setSnackbar:s}),t.jsxs("div",{className:"flx mt-3",children:[t.jsx("b",{className:"wdt-200 d-in-b",children:o("Integration Name:","bit-integrations")}),t.jsx("input",{className:"btcd-paper-inp w-5",onChange:n=>l(n,e,a),name:"name",value:e.name,type:"text",placeholder:o("Integration Name...","bit-integrations")})]}),t.jsx("br",{}),t.jsx(v,{entity:i.triggered_entity,setSnackbar:s}),t.jsx(k,{formID:i.triggered_entity_id,formFields:m,handleInput:n=>l(n,e,a),omniSendConf:e,setOmniSendConf:a,loading:g,setLoading:u,setSnackbar:s}),t.jsx(y,{edit:!0,saveConfig:h,disabled:e.field_map.length<1,isLoading:c,dataConf:e,setDataConf:a,formFields:m}),t.jsx("br",{})]})}export{U as default};
