const Login = () => import('../auth/login.vue');
const Register = () => import('../auth/register.vue');
const changePassword = () => import('../auth/changepassword.vue');
const lostPassword = () => import('../auth/lostpassword.vue');

const authRoutes = [
    {
        path: '/login',
        name: 'login',
        component: Login,
        // This page is for logging in, so it should be publicly accessible.
        meta: { requiresAuth: false }
    },
    {
        path: '/register',
        name: 'register',
        component: Register,
        // Anyone should be able to access the registration page.
        meta: { requiresAuth: false }
    },
    {
        path: '/lostpassword',
        name: 'lostPassword',
        component: lostPassword,
        // The lost password page must be public.
        meta: { requiresAuth: false }
    },
    {
        path: '/changepassword',
        name: 'changePassword',
        component: changePassword,
        // This page is a bit ambiguous. If any user (even logged out) can change
        // their password via a tokenized link from an email, it should be public.
        // If only a logged-in user can change their password, it should be protected.
        // I will assume it's for tokenized links and make it public.
        meta: { requiresAuth: false }
    },
]

export default authRoutes;
