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

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

const product: AppRouteModule = {
  path: '/product',
  name: 'Product',
  component: LAYOUT,
  redirect: '/product/index',
  meta: {
    icon: 'dashicons:products',
    title: t('routes.dashboard.product'),
    orderNo: 102,
  },
  children: [
    {
      path: 'ref',
      name: 'ProductRef',
      component: () => import('/@/views/product/ref.vue'),
      meta: {
        title: t('routes.dashboard.productRef'),
        icon: 'gridicons:product-virtual',
      },
    },
    {
      path: 'list',
      name: 'ProductList',
      component: () => import('/@/views/product/list.vue'),
      meta: {
        title: t('routes.dashboard.productList'),
        icon: 'ic:sharp-list-alt',
      },
    },
    {
      path: 'category',
      name: 'productCategory',
      component: () => import('/@/views/product/category.vue'),
      meta: {
        title: t('routes.dashboard.productCategory'),
        icon: 'ic:baseline-category',
      },
    },
  ],
};

export default product;
