import { createRouter, createWebHistory } from 'vue-router'

const routes = [
  {
    path: '/',
    name: 'Home',
    component: () => import('../views/Home.vue')
  },
  {
    path: '/user',
    name: 'User',
    component: () => import('../views/User.vue')
  },
  {
    path: '/equipManage/:data',
    name: 'EquipManage',
    component: () => import('../views/Equipment/EquipmentManagement.vue')
  },
  {
    path: '/materialManage/:data',
    name: 'MaterialManage',
    component: () => import('../views/Material/MaterialManagement.vue')
  },
  {
    path: '/staffManage/:data',
    name: 'StaffManage',
    component: () => import('../views/Staff/StaffManagement.vue')
  },
  {
    path: '/staffDetail/:data',
    name: 'StaffDetail',
    component: () => import('../views/Staff/StaffDetail.vue')
  },
  {
    path: '/equipDetail/:data',
    name: 'EquipDetail',
    component: () => import('../views/Equipment/EquipmentDetails.vue')
  },
  {
    path: '/equipConfirm/:data',
    name: 'EquipConfirm',
    component: () => import('../views/Equipment/EquipmentConfirm.vue')
  },
  {
    path: '/materialDetail/:data',
    name: 'MaterialDetail',
    component: () => import('../views/Material/MaterialDetails.vue')
  },
  {
    path: '/materialConfirm/:data',
    name: 'MaterialConfirm',
    component: () => import('../views/Material/MaterialConfirm.vue')
  },
  {
    path: '/iceEventManage/:data',  
    name: 'IceEventManage',
    component: () => import('../views/IceEvent/IceEventManagement.vue')
  },
  {
    path: '/iceEventAdd/:data',
    name: 'IceEventAdd',
    component: () => import('../views/IceEvent/IceEventAdd.vue')
  },
  {
    path: '/iceEventDetail',
    name: 'IceEventDetail',
    component: () => import('../views/IceEvent/IceEventDetails.vue')
  },
  {
    path: '/warningMessage',
    name: 'WarningMessage',
    component: () => import('../views/WarningMessage/WarningMessage.vue')
  },
  {
    path: '/warningMessage-detail',
    name: 'WarningMessageDetail',
    component: () => import('../views/WarningMessage/WarningMessageDetail.vue')
  },
  {
    path: '/warningMessageHandle',
    name: 'WarningMessageHandle',
    component: () => import('../views/WarningMessage/WarningMessageHandle.vue')
  },
  {
    path: '/rebuild',
    name: 'Rebuild',
    component: () => import('../views/Rebuild/Rebuild.vue')
  },
  {
    path: '/rebuild-add/:data?',
    name: 'RebuildAdd',
    component: () => import('../views/Rebuild/RebuildAdd.vue')
  },
  {
    path: '/rebuild-details/:data?',
    name: 'RebuildDetails',
    component: () => import('../views/Rebuild/RebuildDetails.vue')
  },
  {
    path: '/disasterManagement',
    name: 'DisasterManagement',
    component: () => import('../views/DisasterManagement/DisasterManagement.vue')
  },
  {
    path: '/disasterReport',
    name: 'DisasterReport',
    component: () => import('../views/DisasterManagement/DisasterReport.vue')
  },
  {
    path: '/waterDisasterDetail',
    component: () => import('../views/DisasterManagement/WaterDisasterDetail.vue')
  }
]

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes
})

export default router
