import { AppRouteRecord } from '@/types/router'

/**
 * 商户管理相关路由模块
 */
const merchantRoutes: AppRouteRecord = {
  path: '/merchant',
  name: 'Merchant',
  component: '/index/index',
  redirect: '/merchant/list',
  meta: {
    title: 'menus.merchant.title',
    icon: 'ri:store-2-line',
    order: 4
  },
  children: [
    {
      path: 'list',
      name: 'MerchantList',
      component: '/merchant/list',
      meta: {
        title: 'menus.merchant.list',
        icon: 'ri:list-unordered'
      }
    },
    {
      path: 'review',
      name: 'MerchantReview',
      component: '/merchant/review',
      meta: {
        title: 'menus.merchant.review',
        icon: 'ri:shield-check-line'
      }
    },
    {
      path: 'store',
      name: 'StoreList',
      component: '/store/store-list/index',
      meta: {
        title: 'menus.store.title',
        icon: 'ri:store-2-line',
        permission: ['store:read']
      }
    }
  ]
}

export default merchantRoutes
