import type { AppRouteModule } from '/@/router/types';
import { RoleEnum } from '/@/enums/roleEnum';
import { LAYOUT } from '/@/router/constant';
import { t } from '/@/hooks/web/useI18n';

const mapOpt: AppRouteModule = {
  path: '/map-opt',
  name: 'MapOpt',
  component: LAYOUT,
  redirect: '/map-opt/list',
  meta: {
    hideChildrenInMenu: true,
    icon: 'codicon:project',
    title: t('layout.mapOpt.title'),
    orderNo: 102,
    roles: [RoleEnum.SUPER, RoleEnum.PLAT_ADMIN, RoleEnum.COMPANY_ADMIN],
  },
  children: [
    {
      path: 'list',
      name: 'mapOptIndex',
      component: () => import('/@/views/map/list.vue'),
      meta: {
        title: t('layout.mapOpt.title'),
        icon: 'codicon:project',
        roles: [RoleEnum.SUPER, RoleEnum.PLAT_ADMIN, RoleEnum.COMPANY_ADMIN],
      },
    },
  ],
};

export default mapOpt;
