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

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

const routes: RouteRecordRaw[] = [
  {
    component: BasicLayout,
    meta: {
      icon: 'lucide:layout-dashboard',
      order: -1,
      title: $t('page.experiment.title'),
      authority: ['super', 'AC9201', 'AC9202', 'AC9214'],
    },
    name: 'Experiment',
    path: '/experiment',
    children: [
      {
        name: 'Abtest',
        path: '/abtest',
        component: () => import('#/views/experiment/abtest/index.vue'),
        meta: {
          affixTab: false,
          icon: 'lucide:flask-conical',
          title: $t('page.experiment.abtest'),
          authority: ['super', 'AC9201', 'AC9202', 'AC9203', 'AC9204', 'AC9205', 'AC9206', 'AC9207', 'AC9208', 'AC9209', 'AC9210', 'AC9211', 'AC9212', 'AC9213'],
        },
      },
      {
        name: 'ExperimentGroupQuery',
        path: '/group-query',
        component: () => import('#/views/experiment/group-query/index.vue'),
        meta: {
          affixTab: false,
          icon: 'lucide:users',
          title: $t('page.experiment.groupQuery'),
          authority: ['super', 'AC9214'],
        },
      },
    ],
  },
];

export default routes;
