import C from"./WebMembershipOverview-DKLZRe83.mjs";import M from"./WebSiteUserMembershipSignupForm-8-dZhQ56.mjs";import{_ as U,B as x,bm as B,bn as F,O as p,y as I,aP as D,o,b as u,w as G,a8 as L,h as e,L as N,a as h,d as _,c as i,n as O,i as a,a6 as R,aY as V,N as W}from"./entry.DPwc-EV0.js";import{s as q}from"./index-CngUKuta.mjs";import"./WebMembershipFeatures-BkDPfg79.mjs";import"./WebFormFieldsNew-e5jbMxoy.mjs";import"./dynamic-import-helper-CUkzFinH.mjs";import"./WebFormWrapper-Dq_9vKBT.mjs";import"./useVueRecaptcha-BjW5Chvt.mjs";const T={class:"site-user-gate"},z={key:0,class:"button"},A=["href"],E={key:1},P={__name:"WebSiteUserGate",props:{memberships:{type:Array},displayMode:{type:String,default:"redirect"},page:{type:Object,required:!0}},setup(t){const b=t;x();const{getUserInfo:f,getRegistrationLink:$,getLoginLink:g}=V,{gatingInfo:y,ContentGateStatus:v}=B(b.page),{hasFreeView:s,meterDescription:n}=F(),r=p(!0),c=p(),m=I({heading:s.value?q(n.value,{allowedTags:[]}):"Registration Required",description:s.value?null:n.value});return D(async()=>{c.value=await f(),document.querySelector("#before-content")!==null&&(r.value=!s.value)}),(l,j)=>{const w=C,S=M,k=W;return o(),u(k,null,{default:G(()=>{var d;return[(o(),u(L,{to:"#before-content",disabled:e(r)},[N(h("div",T,[_(w,{"from-gate":!0,"show-membership-title":!e(s),"show-description":!e(s),heading:e(m).heading,description:e(m).description,memberships:t.memberships,"include-choices":!0},null,8,["show-membership-title","show-description","heading","description","memberships"]),t.displayMode==="redirect"?(o(),i("div",z,[e(c)?a("",!0):(o(),i("div",{key:0,class:"login",style:O({color:l.$ss.baseStyles.primaryColor,fontFamily:l.$ss.primaryFontFamily})},[h("a",{href:e(g)()}," I already have an account ",8,A)],4))])):a("",!0),t.displayMode==="embedded"?(o(),i("div",E,[_(S,{membership:t.memberships[0],"from-gate":!0},null,8,["membership"])])):a("",!0)],512),[[R,((d=e(y))==null?void 0:d.status)!==e(v).PASSED]])],8,["disabled"]))]}),_:1})}}},se=U(P,[["__scopeId","data-v-6f9927c8"]]);export{se as default};