import type { RouteRecordRaw } from 'vue-router'

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

export const AllocationRoute: RouteRecordRaw = {
  path: '/biz/allocation',
  component: Layout,
  meta: { title: '资产分配', icon: 'i-ri:user-shared-line' },
  children: [{
    path: '',
    name: 'bizAllocationList',
    component: () => import('@/views/biz/allocation/list.vue'),
    meta: { title: '资产分配' },
  }],
}

export const FailureRoute: RouteRecordRaw = {
  path: '/biz/failure',
  component: Layout,
  meta: { title: '故障报修', icon: 'i-ri:error-warning-line' },
  children: [{
    path: '',
    name: 'bizFailureList',
    component: () => import('@/views/biz/failure/list.vue'),
    meta: { title: '故障报修' },
  }],
}

export const StocktakeRoute: RouteRecordRaw = {
  path: '/biz/stocktake',
  component: Layout,
  meta: { title: '盘点管理', icon: 'i-ri:checkbox-multiple-line' },
  children: [{
    path: '',
    name: 'bizStocktakeList',
    component: () => import('@/views/biz/stocktake/list.vue'),
    meta: { title: '盘点管理' },
  }],
}

export const RequestRoute: RouteRecordRaw = {
  path: '/biz/request',
  component: Layout,
  meta: { title: '资产申请', icon: 'i-ri:file-list-2-line' },
  children: [{
    path: '',
    name: 'bizRequestList',
    component: () => import('@/views/biz/request/list.vue'),
    meta: { title: '资产申请' },
  }],
}

export const TransactionRoute: RouteRecordRaw = {
  path: '/biz/transaction',
  component: Layout,
  meta: { title: '出入库明细', icon: 'i-ri:swap-line' },
  children: [{
    path: '',
    name: 'bizTransactionList',
    component: () => import('@/views/biz/transaction/list.vue'),
    meta: { title: '出入库明细' },
  }],
}
