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

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

const routes: RouteRecordRaw[] = [
  {
    meta: {
      icon: 'ion:settings-outline',
      order: 4,
      title: $t('page.system.title'),
    },
    name: 'System',
    path: '/system',
    redirect: '/system/parameter',
    children: [
      {
        name: 'UserManagement',
        path: 'user',
        component: () => import('#/views/system/user/index.vue'),
        meta: {
          icon: 'ion:people-outline',
          title: $t('page.system.user'),
          hideInMenu: true,
        },
      },
      {
        name: 'ParameterSettings',
        path: 'parameter',
        component: () => import('#/views/system/parameter/index.vue'),
        meta: {
          icon: 'ion:options-outline',
          title: $t('page.system.parameter'),
        },
      },
      {
        name: 'BackendControl',
        path: 'control',
        component: () => import('#/views/system/control/index.vue'),
        meta: {
          icon: 'ion:server-outline',
          title: $t('page.system.control'),
        },
      },
    ],
  },
];

export default routes;