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

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

const routes: RouteRecordRaw[] = [
  {
    component: BasicLayout,
    meta: {
      icon: 'lucide:file-clock',
      order: 1001,
      title: $t('page.operation.title'),
      authority: ['super', 'AC6001', 'AC7001', 'AC8001', 'AC9301', 'AC5002','AC9401'],
    },
    name: 'Operation',
    path: '/operation',
    children: [
      {
        name: 'ApkDownload',
        path: '/apk-download',
        component: () => import('#/views/operation/apk/index.vue'),
        meta: {
          affixTab: true,
          icon: 'material-symbols:cloud-download',
          title: $t('page.operation.apk'),
          authority: ['super', 'AC9401'],
        },
      },
      {
        name: 'Scripts',
        path: '/scripts',
        component: () => import('#/views/operation/scripts/index.vue'),
        meta: {
          affixTab: true,
          icon: 'lucide:chart-no-axes-column-increasing',
          title: $t('page.operation.scripts'),
          authority: ['super', 'AC9301', 'AC9302', 'AC9303'],
        },
      },
      {
        name: 'Mail',
        path: '/mail',
        component: () => import('#/views/operation/mail/index.vue'),
        meta: {
          affixTab: true,
          icon: 'lucide:mail',
          title: $t('page.operation.mail'),
          authority: ['super', 'AC7001', 'AC7002', 'AC7003'],
        },
      },
      {
        name: 'CopyUser',
        path: '/copyUser',
        component: () => import('#/views/operation/copyUser/index.vue'),
        meta: {
          affixTab: true,
          icon: 'lucide:mail',
          title: $t('page.operation.copyUser'),
          authority: ['super', 'AC8001'],
        },
      },
      {
        name: 'Order',
        path: '/order',
        component: () => import('#/views/operation/order/index.vue'),
        meta: {
          affixTab: true,
          icon: 'lets-icons:order',
          title: $t('page.operation.order'),
          authority: ['super', 'AC5002'],
        },
      },
      {
        name: 'Activity',
        path: '/activity',
        component: () => import('#/views/operation/activity/index.vue'),
        meta: {
          affixTab: true,
          icon: 'lets-icons:order',
          title: $t('page.operation.activity'),
          authority: ['super', 'AC6001', 'AC6002', 'AC6003', 'AC6004', 'AC6005'],
        },
      }
    ],
  },
];

export default routes;
