import type { AppRouteModule } from '/@/router/types';

import { LAYOUT } from '/@/router/constant';
import { t } from '/@/hooks/web/useI18n';

const config: AppRouteModule = {
  path: '/config',
  name: 'Config',
  component: LAYOUT,
  redirect: '/config/model',
  meta: {
    orderNo: 2000,
    icon: 'ion:settings-outline',
    title: t('配置管理'),
  },
  children: [
    {
      path: 'model',
      name: 'ModelManagement',
      meta: {
        title: '机型配置',
        ignoreKeepAlive: false,
      },
      component: () => import('/@/views/config/model/index.vue'),
    },
    {
      path: 'model_detail/:id',
      name: 'ModelDetail',
      meta: {
        hideMenu: true,
        title: t('机型详情'),
        ignoreKeepAlive: true,
        showMenu: false,
        currentActiveMenu: '/config/model',
      },
      component: () => import('/@/views/config/model/detail.vue'),
    },
    // {
    //   path: 'role',
    //   name: 'RoleManagement',
    //   meta: {
    //     title: t('routes.demo.system.role'),
    //     ignoreKeepAlive: true,
    //   },
    //   component: () => import('/@/views/system/role/index.vue'),
    // },
  ],
};

export default config;
