import type { RouteRecordRaw } from 'vue-router'

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

export const DeviceRoute: RouteRecordRaw = {
  path: '/asset/device',
  component: Layout,
  meta: { title: '设备管理', icon: 'i-ri:computer-line' },
  children: [{
    path: '',
    name: 'assetDeviceList',
    component: () => import('@/views/asset/device/list.vue'),
    meta: { title: '设备管理' },
  }],
}

export const LicenseRoute: RouteRecordRaw = {
  path: '/asset/license',
  component: Layout,
  meta: { title: '软件授权', icon: 'i-ri:key-2-line' },
  children: [{
    path: '',
    name: 'assetLicenseList',
    component: () => import('@/views/asset/license/list.vue'),
    meta: { title: '软件授权' },
  }],
}

export const AccessoryRoute: RouteRecordRaw = {
  path: '/asset/accessory',
  component: Layout,
  meta: { title: '配件管理', icon: 'i-ri:tools-line' },
  children: [{
    path: '',
    name: 'assetAccessoryList',
    component: () => import('@/views/asset/accessory/list.vue'),
    meta: { title: '配件管理' },
  }],
}

export const ConsumableRoute: RouteRecordRaw = {
  path: '/asset/consumable',
  component: Layout,
  meta: { title: '耗材管理', icon: 'i-ri:archive-line' },
  children: [{
    path: '',
    name: 'assetConsumableList',
    component: () => import('@/views/asset/consumable/list.vue'),
    meta: { title: '耗材管理' },
  }],
}

export const OfferingRoute: RouteRecordRaw = {
  path: '/asset/offering',
  component: Layout,
  meta: { title: '服务管理', icon: 'i-ri:service-line' },
  children: [{
    path: '',
    name: 'assetOfferingList',
    component: () => import('@/views/asset/offering/list.vue'),
    meta: { title: '服务管理' },
  }],
}

export const DepreciationRoute: RouteRecordRaw = {
  path: '/asset/depreciation',
  component: Layout,
  meta: { title: '折旧规则', icon: 'i-ri:money-cny-circle-line' },
  children: [{
    path: '',
    name: 'assetDepreciationList',
    component: () => import('@/views/asset/depreciation/list.vue'),
    meta: { title: '折旧规则' },
  }],
}
