const tokenAuthRouteComponent = () => import('@/pages/token-auth.vue')

// 👉 Redirects
export const redirects = [
  // ℹ️ We are redirecting to different pages based on role.
  // NOTE: Role is just for UI purposes. ACL is based on abilities.
  // {
  //   path: '/',
  //   name: 'index',
  //   redirect: to => {
  //     // TODO: Get type from backend
  //     const userData = useCookie('userData')
  //     const userRole = userData.value?.role
  // if (userRole === 'admin')
  //   return { name: 'dashboards-academy' }
  // if (userRole === 'client')
  //   return { name: 'access-control' }
  //     if (userRole == undefined)
  //       return { name: 'login', query: to.query }

  //   },
  // },
]
export const routes = [
  // Auth Token
  {
    path: '/auth/token/:token',
    name: 'token-auth',
    component: tokenAuthRouteComponent,
    meta: {
      navActiveLink: 'token-auth',
      public: true,
      layout: 'blank'
    },
  },
]
