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

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

const routes: RouteRecordRaw[] = [
  {
    meta: {
      icon: 'ion:football-outline',
      order: 3,
      title: $t('page.match.title'),
    },
    name: 'Match',
    path: '/match',
    children: [
      {
        name: 'RelatedMatch',
        path: '/related',
        component: () => import('#/views/match/related/index.vue'),
        meta: {
          icon: 'ion:git-compare-outline',
          title: $t('page.match.related'),
          roles: ['admin'], // Only users with admin role can access this page
        },
      },
      {
        name: 'CenterOrder',
        path: '/solutions',
        component: () => import('#/views/match/solutions/index.vue'),
        meta: {
          icon: 'ion:receipt-outline',
          title: $t('page.match.centerOrder'),
          roles: ['admin'], // Only users with admin role can access this page
        },
      },
    ],
  },
];

export default routes;