import{h as d,$ as h,g as j,k as E,i as b,j as t,_ as o}from"./main.2.9.0.js";import{u as _,e as I,b as c}from"./react-router.DMwpH23k.js";import{S as w}from"./SnackMsg.DYSD96P4.js";import"./Note.NSUdvR3c.js";import"./CopyIcn.CEA_lFLo.js";import{S as C,I as S,s as v}from"./Integrations.DL8wqGct.js";import{h as p,c as y}from"./ElasticEmailCommonFunc.CdVhlC2W.js";import{E as F}from"./ElasticEmailIntegLayout.Be6L1HkN.js";import"./react-vendor.P7K3d6op.js";import"./Table.BfF8RYFZ.js";import"./index.DpWdl9V1.js";import"./TagifyInput.KPPRQJ1B.js";import"./lodash.DCvQBX3r.js";function J({allIntegURL:f}){const g=_(),{id:N}=I(),[i,k]=d(h),[e,a]=d(j),[r,m]=c.useState(!1),[x,s]=c.useState({show:!1}),l=E(b),u=()=>{if(!y(e)){s({show:!0,msg:o("Please map mandatory fields","bit-integrations")});return}v({flow:i,allIntegURL:f,conf:e,navigate:g,edit:1,setIsLoading:m,setSnackbar:s})};return t.jsxs("div",{style:{width:900},children:[t.jsx(w,{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=>p(n,e,a),name:"name",value:e.name,type:"text",placeholder:o("Integration Name...","bit-integrations")})]}),t.jsx("br",{}),t.jsx(C,{entity:i.triggered_entity,setSnackbar:s}),t.jsx(F,{formID:i.triggered_entity_id,formFields:l,handleInput:n=>p(n,e,a),elasticEmailConf:e,setElasticEmailConf:a,isLoading:r,setIsLoading:m,setSnackbar:s}),t.jsx(S,{edit:!0,saveConfig:u,disabled:e.field_map.length<1,isLoading:r,dataConf:e,setDataConf:a,formFields:l}),t.jsx("br",{})]})}export{J as default};
