import type { RouteRecordRaw } from 'vue-router';

import { BasicLayout } from '#/layouts';
import { $t } from '#/locales';

const routes: RouteRecordRaw[] = [
  {
    component: BasicLayout,
    meta: {
      icon: 'lucide:monitor-cog',
      order: 0,
      title: $t('page.devops.title'),
      authority: ['super',  'AC4004', 'AC4006', 'AC4007', 'AC4008', 'AC4009', 'AC4010', 'AC4011'],
    },
    name: 'Devops',
    path: '/devops',
    children: [
      {
        name: 'ServerList',
        path: '/server-list',
        component: () => import('#/views/dashboard/serverList/index.vue'),
        meta: {
          affixTab: false,
          icon: 'lucide:gamepad',
          title: $t('page.devops.server-list'),
          authority: ['super',  'AC4006', 'AC4010', 'AC4011'],
        },
      },
      {
        name: 'AppList',
        path: '/app-list',
        component: () => import('#/views/dashboard/appList/index.vue'),
        meta: {
          affixTab: false,
          icon: 'lucide:app-window',
          title: $t('page.devops.app-list'),
          authority: ['super',  'AC4007', 'AC4008', 'AC4009'],
        },
      },
      {
        name: 'NodeList',
        path: '/node-list',
        component: () => import('#/views/dashboard/nodeList/index.vue'),
        meta: {
          affixTab: false,
          icon: 'lucide:server',
          title: $t('page.devops.node-list'),
          authority: ['super', 'AC4004', 'AC4005'],
        },
      },
      {
        name: 'MysqlList',
        path: '/mysql-list',
        component: () => import('#/views/dashboard/mysqlList/index.vue'),
        meta: {
          affixTab: false,
          icon: 'lucide:database',
          title: $t('page.devops.mysql-list'),
          authority: ['super'],
        },
      },
    ],
  },
];

export default routes;
