var k=Object.defineProperty;var b=Object.getOwnPropertySymbols;var y=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable;var h=(s,e,t)=>e in s?k(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,f=(s,e)=>{for(var t in e||(e={}))y.call(e,t)&&h(s,t,e[t]);if(b)for(var t of b(e))A.call(e,t)&&h(s,t,e[t]);return s};import{u as C,k as I,r as p,j as a}from"./main-406.js";import{d as N,_ as w,I as _,s as E}from"./bi.394.85.js";import{S as T}from"./bi.68.941.js";import{P as D,h as F}from"./bi.489.831.js";import L from"./bi.271.230.js";import"./bi.46.744.js";import"./bi.150.760.js";function O({formFields:s,setFlow:e,flow:t,allIntegURL:d,isInfo:u,edit:x}){const P=C(),{formID:g}=I(),[o,n]=p.useState(!1),[r,l]=p.useState(1),[v,m]=p.useState({show:!1}),j=[{key:"1",label:"Add the user to a membership"},{key:"2",label:"Remove the user from a membership"}],[i,c]=p.useState({name:"Paid Membership Pro",type:"PaidMembershipPro",mainAction:"",field_map:[{formField:"",paidmembershipproFormField:""}],allActions:j,actions:{}}),S=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),i.mainAction!==""&&l(3)};return a.jsxs("div",{children:[a.jsx(N,{snack:v,setSnackbar:m}),a.jsx("div",{className:"txt-center mt-2",children:a.jsx(T,{step:3,active:r})}),a.jsx(L,{formID:g,paidMembershipProConf:i,setPaidMembershipProConf:c,step:r,setStep:l,isLoading:o,setIsLoading:n,setSnackbar:m}),a.jsxs("div",{className:"btcd-stp-page",style:f({},r===2&&{width:900,minHeight:"350px",overflow:"visible"}),children:[a.jsx(D,{formFields:s,handleInput:M=>F(M,i,c,n),paidMembershipProConf:i,setPaidMembershipProConf:c,isLoading:o,setIsLoading:n,setSnackbar:m,allIntegURL:d,isInfo:u,edit:x}),a.jsxs("button",{onClick:()=>S(),disabled:!i.mainAction||o||i.selectedMembership===void 0,className:"btn f-left btcd-btn-lg purple sh-sm flx",type:"button",children:[w("Next","bit-integrations")," ",a.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),a.jsx(_,{step:r,saveConfig:()=>E({flow:t,setFlow:e,allIntegURL:d,navigate:P,conf:i,setIsLoading:n,setSnackbar:m}),isLoading:o,dataConf:i,setDataConf:c,formFields:s})]})}export{O as default};
