"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("vue-router"),c=e.defineComponent({name:"If",__name:"If",props:{when:{}},setup(o){const r=t=>t;return(t,n)=>t.when?e.renderSlot(t.$slots,"default",{key:0,value:r(t.when)}):e.renderSlot(t.$slots,"fallback",{key:1})}}),l=o=>(e.pushScopeId("data-v-36acc161"),o=o(),e.popScopeId(),o),d={class:"fs-loading"},u=l(()=>e.createElementVNode("div",{class:"typewriter"},[e.createElementVNode("div",{class:"slide"},[e.createElementVNode("i")]),e.createElementVNode("div",{class:"paper"}),e.createElementVNode("div",{class:"keyboard"})],-1)),i=[u],p=e.defineComponent({__name:"Loading",setup(o){return(r,t)=>(e.openBlock(),e.createElementBlock("div",d,i))}}),_=(o,r)=>{const t=o.__vccOpts||o;for(const[n,a]of r)t[n]=a;return t},f=_(p,[["__scopeId","data-v-36acc161"]]),h=e.defineComponent({__name:"FsAuthProvider",props:{errorPath:{default:"/error"},authProvider:{}},setup(o){const r=o,t=e.ref(!1),n=s.useRouter();return e.onMounted(()=>{t.value=!0,r.authProvider.checkAuth().then(()=>{t.value=!1},()=>{t.value=!1,n.replace(r.errorPath)})}),(a,v)=>(e.openBlock(),e.createBlock(e.unref(c),{when:t.value},{fallback:e.withCtx(()=>[e.renderSlot(a.$slots,"loading",{},()=>[e.createVNode(f)])]),default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3},8,["when"]))}});exports.default=h;
//# sourceMappingURL=FsAuthProvider.js.map
