import { createRouter, createWebHistory } from 'vue-router';
import Layout from '@renderer/layout/index.vue';

const router = createRouter({
	history: createWebHistory(),
	routes: [
		{
			path: '/',
			component: Layout,
			meta: { title: '整体页面布局' },
			redirect: '/calibration',
			children: [
				{
					path: 'calibration',
					name: 'calibration',
					component: () => import('@renderer/views/calibration/index.vue'),
					meta: {
						menu: 'calibration',
						keepAlive: true
					}
				}
			]
		},
		{
			path: '/', // 这个是根路由，现在我们让它重定向到 /system
			redirect: '/calibration'
		},
		{ path: '/:pathMatch(.*)', redirect: '/' }
	]
});

export default router;
