export default defineNuxtRouteMiddleware((to, from) => {
    const accessToken = useCookie('access_token').value;

    const isPublicRoute =
        ['/auth/login'].includes(to.path) ||
        to.path.startsWith('/auth/activation/');

    if (!accessToken && !isPublicRoute) {
        return navigateTo('/auth/login');
    }
})