import{_ as n,r as i,c as t,b as r,l as a,g as d,e as u,q as l,o}from"./Cmgq8IVP.js";import{B as h}from"./BLdAhwbP.js";const c=u({name:"AuthLoadingWrapper",components:{BaseLoader:h},props:{allowLoggedOut:{type:Boolean,default:!1},waitForData:{type:Boolean,default:!1},isDataLoading:{type:Boolean,default:!1}},data(){return{isMounted:!1}},computed:{authStore(){return l()},showLoading(){return!this.isMounted||!this.authStore.authInitialized||this.waitForData&&this.isDataLoading}},async created(){this.authStore.authInitialized||await this.authStore.initializeAuth()},mounted(){this.isMounted=!0}}),p={class:"auth-wrapper"},_={key:0,class:"auth-loading"},f={key:1},m={key:2};function g(e,L,B,w,v,y){const s=i("BaseLoader");return o(),t("div",p,[e.showLoading?(o(),t("div",_,[r(s,{variant:"center",size:"medium"})])):e.authStore.isLoggedIn?(o(),t("div",f,[a(e.$slots,"default",{},void 0,!0)])):e.allowLoggedOut?(o(),t("div",m,[a(e.$slots,"logged-out",{},void 0,!0)])):d("",!0)])}const k=n(c,[["render",g],["__scopeId","data-v-6e2e667f"]]);export{k as _};