import{h as f,g as I,$ as b,k as S,i as _,j as e,_ as g}from"./main.2.8.10.js";import{u as w,e as v,b as n}from"./react-router.DMwpH23k.js";import{S as M}from"./SnackMsg.7BjcJK1j.js";import{S as N,I as k,s as y}from"./Integrations.BFhED4ck.js";import{h,c as F}from"./MailChimpCommonFunc.BWlyyYbz.js";import{M as E}from"./MailChimpIntegLayout.w15nUUxj.js";import"./Note.DalStCGz.js";import"./CopyIcn.BnhKHfEP.js";import"./react-vendor.P7K3d6op.js";import"./Table.DSsAy4VI.js";import"./index.DpWdl9V1.js";import"./MailChimpIntegrationHelpers.D6dD8hCL.js";import"./ActionProFeatureLabels.BzMNdAoD.js";import"./TagifyInput.C4ilRm4k.js";import"./lodash.DCvQBX3r.js";function U({allIntegURL:x}){const u=w(),{id:L,formID:r}=v(),[t,a]=f(I),[m,C]=f(b),[d,p]=n.useState({}),[l,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,p,s,i),mailChimpConf:t,setMailChimpConf:a,isLoading:l,setIsLoading:i,setSnackbar:s,loading:d,setLoading:p}),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:l,dataConf:t,setDataConf:a,formFields:c}),e.jsx("br",{})]})}export{U as default};
