import{Et as e,Nt as t,Pt as n,Tt as r,st as i}from"../chunks/xY0c-UfG.js";import{r as a}from"../chunks/Bym3iIKr.js";import"../chunks/xihTtKlq.js";import"../chunks/_zekciZc.js";import{n as o}from"../chunks/C9QtJpOb.js";import{t as s}from"../chunks/Y1ENS0GB.js";import{i as c,r as l,t as u}from"../chunks/B8esiVhq2.js";function d(d,f){n(f,!0);let p=()=>e(o,`$page`,m),[m,h]=r();i(()=>{let e=p().params.tab??``;if(s.authEnabled&&s.loading)return;let t=l[e];if(t){a(`/settings/${t}`,{replaceState:!0});return}let n=!s.authEnabled||s.user?.role===`owner`;if(u.has(e)&&!n){a(`/`,{replaceState:!0});return}c(e)}),t(),h()}export{d as component};