import Layout from '@/sheep/layouts/index.vue';

export const rootRoute = {
  path: '/',
  name: '/',
  meta: {
    title: '首页',
    taskbar: false,
  },
};

// 登录
export const loginRoute = {
  path: '/login',
  name: 'Login',
  component: () => import('@/sheep/views/login/index.vue'),
  meta: {
    title: '登录',
    taskbar: false,
    login: false,
  },
};

// 错误页面
export const errorRoutes = [
  {
    path: '/error',
    name: 'Error',
    component: Layout,
    meta: {
      title: '错误页面',
    },
    children: [
      {
        path: '404',
        name: 'NotFoundPage',
        component: () => import('@/sheep/views/error/404.vue'),
        meta: {
          title: '未找到页面',
        },
      },
      {
        path: '401',
        name: 'NotLogin',
        component: () => import('@/sheep/views/error/401.vue'),
        meta: {
          title: '请先登录',
        },
      },
      {
        path: '403',
        name: 'Forbidden',
        component: () => import('@/sheep/views/error/403.vue'),
        meta: {
          title: '暂无权限访问',
        },
      },
    ],
  },
  {
    path: '/:catchAll(.*)',
    redirect: '/error/404',
  },
];
