import type { RouteRecordRaw } from 'vue-router'

function Layout() {
  return import('@/layouts/index.vue')
}

export const CategoryRoute: RouteRecordRaw = {
  path: '/base/category',
  component: Layout,
  meta: { title: '分类管理', icon: 'i-ri:list-settings-line' },
  children: [{
    path: '',
    name: 'baseCategoryList',
    component: () => import('@/views/base/category/list.vue'),
    meta: { title: '分类管理' },
  }],
}

export const ManufacturerRoute: RouteRecordRaw = {
  path: '/base/manufacturer',
  component: Layout,
  meta: { title: '厂商管理', icon: 'i-ri:building-line' },
  children: [{
    path: '',
    name: 'baseManufacturerList',
    component: () => import('@/views/base/manufacturer/list.vue'),
    meta: { title: '厂商管理' },
  }],
}

export const ModelRoute: RouteRecordRaw = {
  path: '/base/model',
  component: Layout,
  meta: { title: '型号管理', icon: 'i-ri:layout-grid-line' },
  children: [{
    path: '',
    name: 'baseModelList',
    component: () => import('@/views/base/model/list.vue'),
    meta: { title: '型号管理' },
  }],
}

export const LocationRoute: RouteRecordRaw = {
  path: '/base/location',
  component: Layout,
  meta: { title: '位置管理', icon: 'i-ri:map-pin-line' },
  children: [{
    path: '',
    name: 'baseLocationList',
    component: () => import('@/views/base/location/list.vue'),
    meta: { title: '位置管理' },
  }],
}

export const SupplierRoute: RouteRecordRaw = {
  path: '/base/supplier',
  component: Layout,
  meta: { title: '供应商管理', icon: 'i-ri:truck-line' },
  children: [{
    path: '',
    name: 'baseSupplierList',
    component: () => import('@/views/base/supplier/list.vue'),
    meta: { title: '供应商管理' },
  }],
}

