/*
 * @Author: donghao donghao@supervision.ltd
 * @Date: 2025-07-02 13:17:44
 * @LastEditors: donghao donghao@supervision.ltd
 * @LastEditTime: 2025-07-10 14:04:12
 * @FilePath: \Robot-Al-Platform-Web\src\renderer\src\router\index.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { createRouter, createWebHashHistory } from 'vue-router'
import Home from '@views/Home/index.vue'
import Design from '@views/Design/index.vue'
// import TestLF from '@views/Test/logicFlow.vue'

export default createRouter({
  history: createWebHashHistory(), //hash模式
  routes: [
    { path: '/', component: Design },
    // { path: '/testLF', component: TestLF }
  ] //路由配置规则数组
})

/** 重置路由 */
export function resetRouter() {
  router.getRoutes().forEach((route) => {
    const { name, meta } = route
    if (name && router.hasRoute(name) && meta?.backstage) {
      router.removeRoute(name)
    }
  })
}
