import{h as d,g as h,$ as j,k as I,i as v,j as t,_ as c}from"./main.2.9.0.js";import{u as w,e as C,b as p}from"./react-router.DMwpH23k.js";import{S}from"./SnackMsg.DYSD96P4.js";import"./Note.NSUdvR3c.js";import"./CopyIcn.CEA_lFLo.js";import{S as _,I as y,s as M}from"./Integrations.DL8wqGct.js";import{M as N}from"./MemberpressIntegLayout.U4AAM9aP.js";import{h as l}from"./MemberpressCommonFunc.C_d7wyKk.js";import"./react-vendor.P7K3d6op.js";import"./Table.BfF8RYFZ.js";import"./index.DpWdl9V1.js";import"./TagifyInput.KPPRQJ1B.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};
