import{b as d,h,$ as j,k as I,i as v,j as t,_ as c}from"./main.2.8.1.js";import{u as w,h as C,d as p}from"./react-router-dom.9mCuUg3q.js";import{S}from"./SnackMsg.S8DrwLlT.js";import"./Note.BeM7sN-p.js";import{S as _,I as y,s as M}from"./Integrations.D2bgBas2.js";import{M as N}from"./MemberpressIntegLayout.CduQPA9z.js";import{h as l}from"./MemberpressCommonFunc.tt3rW2tb.js";import"./CopyIcn.3gZpHton.js";import"./Table.DAL7rcPQ.js";import"./index.wO-AxluA.js";import"./TagifyInput.Cu0YIRbG.js";import"./tagify.YxUZd8Ix.js";function G({allIntegURL:f}){const u=w(),{formID:x}=C(),[e,s]=d(h),[o,k]=d(j),r=I(v),[n,m]=p.useState(!1),[b,a]=p.useState({show:!1});function g(){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:b,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||g(),isLoading:n,dataConf:e,setDataConf:s,formFields:r}),t.jsx("br",{})]})}export{G as default};
