import { createRouter, createWebHistory } from 'vue-router'
import LoginView from '../views/LoginView.vue'
import HomeView from '../views/HomeView.vue'
import RegisterView from '../views/RegisterView.vue'
import ForgotPasswordView from '../views/ForgotPasswordView.vue'
import UserCenterView from '../views/UserCenterView.vue'
import DiseaseDetectionView from '../views/DiseaseDetectionView.vue'
import DetectionRecordsView from '../views/DetectionRecordsView.vue'
import MediaLibraryView from '../views/MediaLibraryView.vue'
import ModelLibraryView from '../views/ModelLibraryView.vue'
import UserManagementView from '../views/UserManagementView.vue'
import OperationLogsView from '../views/OperationLogsView.vue'
import SensorManagementView from '../views/SensorManagementView.vue'
import DataCollectionView from '../views/DataCollectionView.vue'
import DataProcessingView from '../views/DataProcessingView.vue'
import AlertManagementView from '../views/AlertManagementView.vue'
import BatchDetectionView from '../views/BatchDetectionView.vue'
import DefectLedgerView from '../views/DefectLedgerView.vue'
import ReportCenterView from '../views/ReportCenterView.vue'
import ModelTrainingView from '../views/ModelTrainingView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      redirect: '/login',
    },
    {
      path: '/login',
      name: 'login',
      component: LoginView,
    },
    {
      path: '/home',
      name: 'home',
      component: HomeView,
    },
    {
      path: '/register',
      name: 'register',
      component: RegisterView,
    },
    {
      path: '/forgot-password',
      name: 'forgot-password',
      component: ForgotPasswordView,
    },
    {
      path: '/user-center',
      name: 'user-center',
      component: UserCenterView,
    },
    {
      path: '/disease-detection',
      name: 'disease-detection',
      component: DiseaseDetectionView,
    },
    {
      path: '/detection-records',
      name: 'detection-records',
      component: DetectionRecordsView,
    },
    {
      path: '/batch-detection',
      name: 'batch-detection',
      component: BatchDetectionView,
    },
    {
      path: '/defect-ledger',
      name: 'defect-ledger',
      component: DefectLedgerView,
    },
    {
      path: '/report-center',
      name: 'report-center',
      component: ReportCenterView,
    },
    {
      path: '/media-library',
      name: 'media-library',
      component: MediaLibraryView,
    },
    {
      path: '/sensor-management',
      name: 'sensor-management',
      component: SensorManagementView,
    },
    {
      path: '/data-collection',
      name: 'data-collection',
      component: DataCollectionView,
    },
    {
      path: '/data-processing',
      name: 'data-processing',
      component: DataProcessingView,
    },
    {
      path: '/alert-management',
      name: 'alert-management',
      component: AlertManagementView,
    },
    {
      path: '/model-library',
      name: 'model-library',
      component: ModelLibraryView,
    },
    {
      path: '/model-training',
      name: 'model-training',
      component: ModelTrainingView,
    },
    {
      path: '/user-management',
      name: 'user-management',
      component: UserManagementView,
    },
    {
      path: '/operation-logs',
      name: 'operation-logs',
      component: OperationLogsView,
    },
  ],
})

export default router
