import type { AppRouteModule } from '/@/router/types';

import { LAYOUT } from '/@/router/constant';
import { t } from '/@/hooks/web/useI18n';

const order: AppRouteModule = {
  path: '/order',
  name: 'Order',
  component: LAYOUT,
  redirect: '/order/list',
  meta: {
    icon: 'bi:columns',
    title: t('routes.dashboard.order'),
    orderNo: 102,
  },
  children: [
    {
      path: 'list',
      name: 'OrderList',
      component: () => import('/@/views/order/list.vue'),
      meta: {
        title: t('routes.dashboard.orderList'),
        icon: 'mdi:format-list-group',
        hideChildrenInMenu: true,
      },
      children: [
        {
          path: 'detail/:id',
          name: 'OrderDetail',
          component: () => import('/@/views/order/detail.vue'),
          meta: {
            currentActiveMenu: '/order/list',
            title: t('routes.dashboard.orderDetail'),
            hideMenu: true,
            dynamicLevel: 3,
            realPath: '/order/list/detail',
          },
        },
      ],
    },
  ],
};

export default order;
