import{b as m,$ as j,h as b,k as I,i as _,j as e,_ as o}from"./main.2.8.1.js";import{u as w,h as S,d as r}from"./react-router-dom.9mCuUg3q.js";import{S as v}from"./SnackMsg.S8DrwLlT.js";import"./Note.BeM7sN-p.js";import{S as y,I as C,s as F}from"./Integrations.D2bgBas2.js";import{h as l,c as N}from"./GetResponseCommonFunc.rAT3AcM2.js";import{G as k}from"./GetResponseIntegLayout.-iQKfPl3.js";import"./CopyIcn.3gZpHton.js";import"./Table.DAL7rcPQ.js";import"./index.wO-AxluA.js";import"./ActionProFeatureLabels.CuihmlQ8.js";import"./TagifyInput.Cu0YIRbG.js";import"./tagify.YxUZd8Ix.js";function O({allIntegURL:p}){const c=w(),{id:R}=S(),[i,E]=m(j),[t,a]=m(b),[f,G]=r.useState(!1),[g,u]=r.useState({list:!1,field:!1,auth:!1,tags:!1}),[x,s]=r.useState({show:!1}),d=I(_),h=()=>{if(!N(t)){s({show:!0,msg:o("Please map mandatory fields","bit-integrations")});return}F({flow:i,allIntegURL:p,conf:t,navigate:c,edit:1,setSnackbar:s})};return e.jsxs("div",{style:{width:900},children:[e.jsx(v,{snack:x,setSnackbar:s}),e.jsxs("div",{className:"flx mt-3",children:[e.jsx("b",{className:"wdt-200 d-in-b",children:o("Integration Name:","bit-integrations")}),e.jsx("input",{className:"btcd-paper-inp w-5",onChange:n=>l(n,t,a),name:"name",value:t.name,type:"text",placeholder:o("Integration Name...","bit-integrations")})]}),e.jsx("br",{}),e.jsx(y,{entity:i.triggered_entity,setSnackbar:s}),e.jsx(k,{formID:i.triggered_entity_id,formFields:d,handleInput:n=>l(n,t,a),getResponseConf:t,setGetResponseConf:a,loading:g,setLoading:u,setSnackbar:s}),e.jsx(C,{edit:!0,saveConfig:h,disabled:!(t!=null&&t.campaignId),isLoading:f,dataConf:t,setDataConf:a,formFields:d}),e.jsx("br",{})]})}export{O as default};
