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', 'admin'],
    },
    name: 'Operation',
    path: '/operation',
    children: [
      {
        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', 'admin'],
        },
      },
      {
        name: 'Mail',
        path: '/mail',
        component: () => import('#/views/operation/mail/index.vue'),
        meta: {
          affixTab: true,
          icon: 'lucide:mail',
          title: $t('page.operation.mail'),
        },
      },
      {
        name: 'CopyUser',
        path: '/copyUser',
        component: () => import('#/views/operation/copyUser/index.vue'),
        meta: {
          affixTab: true,
          icon: 'lucide:mail',
          title: $t('page.operation.copyUser'),
        },
      },
      {
        name: 'Order',
        path: '/order',
        component: () => import('#/views/operation/order/index.vue'),
        meta: {
          affixTab: true,
          icon: 'lets-icons:order',
          title: $t('page.operation.order'),
        },
      }
    ],
  },
];

export default routes;
