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