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',
    redirect: '/match/solutions',
    children: [
      {
        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
        },
      },
      {
        name: 'DataSync',
        path: 'data-sync',
        component: () => import('#/views/match/data-sync/index.vue'),
        meta: {
          icon: 'ion:sync-outline',
          title: $t('page.match.dataSync'),
          roles: ['admin'],
        },
      },
      {
        name: 'OddsCurve',
        path: 'odds-curve',
        component: () => import('#/views/match/odds-curve/index.vue'),
        meta: {
          icon: 'ion:trending-up-outline',
          title: $t('page.match.oddsCurve'),
          roles: ['admin'],
        },
      },
      {
        name: 'DataTest',
        path: 'data-test',
        component: () => import('#/views/match/datatest/index.vue'),
        meta: {
          icon: 'ion:analytics-outline',
          title: $t('page.match.dataTest'),
          roles: ['admin'], // Only users with admin role can access this page
        },
      },
    ],
  },
];

export default routes;
