import{b as f,h as I,$ as b,k as S,i as _,j as e,_ as g}from"./main.2.8.1.js";import{u as w,h as v,d as n}from"./react-router-dom.9mCuUg3q.js";import{S as M}from"./SnackMsg.S8DrwLlT.js";import{S as N,I as k,s as y}from"./Integrations.D2bgBas2.js";import{h,c as F}from"./MailChimpCommonFunc.IPjUKaax.js";import{M as E}from"./MailChimpIntegLayout.Dx60Ot6S.js";import"./Note.BeM7sN-p.js";import"./Table.DAL7rcPQ.js";import"./CopyIcn.3gZpHton.js";import"./index.wO-AxluA.js";import"./MailChimpIntegrationHelpers.D6dD8hCL.js";import"./ActionProFeatureLabels.CuihmlQ8.js";import"./TagifyInput.Cu0YIRbG.js";import"./tagify.YxUZd8Ix.js";function Q({allIntegURL:x}){const u=w(),{id:L,formID:r}=v(),[t,a]=f(I),[m,C]=f(b),[d,l]=n.useState({}),[p,i]=n.useState(!1),[j,s]=n.useState({show:!1}),c=S(_);return e.jsxs("div",{style:{width:900},children:[e.jsx(M,{snack:j,setSnackbar:s}),e.jsxs("div",{className:"flx mt-3",children:[e.jsx("b",{className:"wdt-200 d-in-b",children:g("Integration Name:","bit-integrations")}),e.jsx("input",{className:"btcd-paper-inp w-5",onChange:o=>h(o,t,a),name:"name",value:t.name,type:"text",placeholder:g("Integration Name...","bit-integrations")})]}),e.jsx("br",{}),e.jsx(N,{entity:m.triggered_entity,setSnackbar:s}),e.jsx(E,{formID:r,formFields:c,handleInput:o=>h(o,t,a,r,d,l,s,i),mailChimpConf:t,setMailChimpConf:a,isLoading:p,setIsLoading:i,setSnackbar:s,loading:d,setLoading:l}),e.jsx(k,{edit:!0,saveConfig:()=>y({flow:m,setFlow:C,allIntegURL:x,conf:t,navigate:u,edit:1,setIsLoading:i,setSnackbar:s}),disabled:t.module===""||t.listId===""||t.field_map.length<1||!F(t),isLoading:p,dataConf:t,setDataConf:a,formFields:c}),e.jsx("br",{})]})}export{Q as default};
