import type { Route } from '@/global'

const Layout = () => import('@/layouts/index.vue')

const routes: Route.recordRaw[] = [
  {
    path: '/data/query',
    component: Layout,
    redirect: '/data/query/list',
    name: 'Query',
    meta: {
      title: '数据查询',
      icon: 'ep:key',
      auth: '/data/query',
    },
    children: [
      {
        path: 'list',
        name: 'DataQueryList',
        component: () => import('@/views/data/query/list.vue'),
        meta: {
          title: '数据查询',
          auth: '/data/query',
          sidebar: false,
          breadcrumb: true,
          activeMenu: '/data/query',
        },
      },
      /* {
        path: 'detail/:id?',
        name: 'GroupInfoDetail',
        component: () => import('@/views/basic/group/detail.vue'),
        meta: {
          title: '分组详情',
          sidebar: false,
          breadcrumb: true,
          activeMenu: '/basic/group',
        },
      }, */
    ],
  },
  {
    path: '/data/alarm',
    component: Layout,
    redirect: '/data/alarm/list',
    name: 'Alarm',
    meta: {
      title: '报警查询',
      icon: 'ep:key',
      auth: '/data/alarm',
    },
    children: [
      {
        path: 'list',
        name: 'AlarmList',
        component: () => import('@/views/data/alarm/index.vue'),
        meta: {
          title: '报警查询',
          auth: '/data/alarm',
          sidebar: false,
          breadcrumb: true,
          activeMenu: '/data/alarm',
        },
      },
    ],
  },
  {
    path: '/data/statis',
    component: Layout,
    redirect: '/data/statis/overview',
    name: 'Statis',
    meta: {
      title: '统计分析',
      icon: 'ep:key',
      auth: '/data/statis',
    },
    children: [
      {
        path: 'overview',
        name: 'StatisOverview',
        component: () => import('@/views/data/statistics/index.vue'),
        meta: {
          title: '统计分析',
          auth: '/data/statis',
          sidebar: false,
          breadcrumb: true,
          activeMenu: '/data/statis',
        },
      },
    ],
  },
]

export default routes
