import{b as m,h as j,$ as b,k as w,i as C,j as t,_ as i}from"./main.2.8.1.js";import{u as I,h as _,d}from"./react-router-dom.9mCuUg3q.js";import{S}from"./SnackMsg.S8DrwLlT.js";import"./Note.BeM7sN-p.js";import{S as v,I as M,s as N}from"./Integrations.D2bgBas2.js";import{h as P,M as k,c as y}from"./MailPoetIntegLayout.DYJx-se1.js";import"./CopyIcn.3gZpHton.js";import"./Table.DAL7rcPQ.js";import"./index.wO-AxluA.js";import"./TagifyInput.Cu0YIRbG.js";import"./tagify.YxUZd8Ix.js";import"./ActionProFeatureLabels.CuihmlQ8.js";function H({allIntegURL:c}){const p=I(),{formID:f}=_(),[e,a]=m(j),[o,g]=m(b),n=w(C),[r,l]=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:l,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:l,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{H as default};
