import{h as d,g as h,$ as j,k as I,i as v,j as t,_ as c}from"./main.2.8.10.js";import{u as w,e as C,b as p}from"./react-router.DMwpH23k.js";import{S}from"./SnackMsg.7BjcJK1j.js";import"./Note.DalStCGz.js";import"./CopyIcn.BnhKHfEP.js";import{S as _,I as y,s as M}from"./Integrations.BFhED4ck.js";import{M as N}from"./MemberpressIntegLayout.BKUwlt_P.js";import{h as l}from"./MemberpressCommonFunc.BggM6OhT.js";import"./react-vendor.P7K3d6op.js";import"./Table.DSsAy4VI.js";import"./index.DpWdl9V1.js";import"./TagifyInput.C4ilRm4k.js";import"./lodash.DCvQBX3r.js";function H({allIntegURL:f}){const u=w(),{formID:x}=C(),[e,s]=d(h),[o,k]=d(j),r=I(v),[n,m]=p.useState(!1),[g,a]=p.useState({show:!1});function b(){return e.mainAction==="1"?e.statusId===void 0||e.gatewayId===void 0||e.selectedMembership===void 0:!1}return t.jsxs("div",{style:{width:900},children:[t.jsx(S,{snack:g,setSnackbar:a}),t.jsxs("div",{className:"flx mt-3",children:[t.jsx("b",{className:"wdt-200 d-in-b",children:c("Integration Name:","bit-integrations")}),t.jsx("input",{className:"btcd-paper-inp w-5",onChange:i=>l(i,e,s),name:"name",value:e.name,type:"text",placeholder:c("Integration Name...","bit-integrations")})]}),t.jsx("br",{}),t.jsx("br",{}),t.jsx(_,{entity:o.triggered_entity,setSnackbar:a}),t.jsx(N,{formID:x,formFields:r,handleInput:i=>l(i,e,s),memberpressConf:e,setMemberpressConf:s,isLoading:n,setIsLoading:m,setSnackbar:a}),t.jsx(y,{edit:!0,saveConfig:()=>M({flow:o,allIntegURL:f,conf:e,navigate:u,edit:1,setIsLoading:m,setSnackbar:a}),disabled:!e.mainAction||n||b(),isLoading:n,dataConf:e,setDataConf:s,formFields:r}),t.jsx("br",{})]})}export{H as default};
