import{_ as C}from"./WebMembershipOverview-FHt6gH2f.mjs";import{_ as M}from"./WebSiteUserMembershipSignupForm-te0Vy87N.mjs";import{_ as N,ce as D,cf as F,u as I,R as p,z as U,S as z,o as a,b as _,s as B,ag as V,k as e,N as q,a as h,y as A,d as b,c as n,p as G,l as i,aa as O,by as R,Q as T}from"./CmnEfQIC.js";import{s as W}from"./index-BbMj1cIu.mjs";import"./WebMembershipFeatures-BS3mhgQJ.mjs";const E={key:0,class:"button"},L=["href"],j={key:1},H={__name:"WebSiteUserGate",props:{memberships:{type:Array},displayMode:{type:String,default:"redirect"},page:{type:Object,required:!0}},setup(s){const g=s,{getUserInfo:f,getLoginLink:y}=R,{gatingInfo:v,ContentGateStatus:w}=D(g.page),{hasFreeView:o,meterDescription:r}=F(),{$ss:t}=I(),c=p(!0),l=p(),m=U({heading:o.value?W(r.value,{allowedTags:[]}):t!=null&&t.useNewDesign?"":"Registration Required",description:o.value?null:r.value});return z(async()=>{l.value=await f(),document.querySelector("#before-content")!==null&&(c.value=!o.value)}),(P,Q)=>{const S=C,k=M,x=T;return a(),_(x,null,{default:B(()=>{var d,u;return[(a(),_(V,{to:"#before-content",disabled:e(c)},[q(h("div",{class:A(["site-user-gate",(d=e(t))!=null&&d.useNewDesign?"new-design":""])},[b(S,{"from-gate":!0,"show-membership-title":!e(o),"show-description":!e(o),heading:e(m).heading,description:e(m).description,memberships:s.memberships,"include-choices":!0},null,8,["show-membership-title","show-description","heading","description","memberships"]),s.displayMode==="redirect"?(a(),n("div",E,[e(l)?i("",!0):(a(),n("div",{key:0,class:"login",style:G({color:e(t).baseStyles.primaryColor,fontFamily:e(t).primaryFontFamily})},[h("a",{href:e(y)()}," I already have an account ",8,L)],4))])):i("",!0),s.displayMode==="embedded"?(a(),n("div",j,[b(k,{membership:s.memberships[0],"from-gate":!0},null,8,["membership"])])):i("",!0)],2),[[O,((u=e(v))==null?void 0:u.status)!==e(w).PASSED]])],8,["disabled"]))]}),_:1})}}},$=N(H,[["__scopeId","data-v-985c15ee"]]);export{$ as default};