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


const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/screen', component: () => import('@/pages/screen.page.vue'),
    },
    {
      path: '/',
      children: [
        { path: 'register', component: () => import('@/pages/register.page.vue'), meta: { title: '建档' } },
        { path: 'camera', component: () => import('@/modules/camera/page.vue'), meta: { title: '拍摄2' } },
        { path: 'questionnaire', component: () => import('@/modules/questionnaire/page.vue'), meta: { title: '问卷' } },
        { path: 'report/:id/scheme', component: () => import('@/modules/report/scheme.page.vue'), meta: { title: '调理方案' } },
        { path: 'report/:id', component: () => import('@/modules/report/report.page.vue'), meta: { title: '健康分析报告' } },
        { path: '', redirect: '/screen' },
      ],
      components: {
        header: () => import('@/widgets/header.widget.vue'),
        // footer: () => import('@/widgets/footer.widget.vue'),
        default: () => import('@/views/page.view.vue'),
      },
    },
  ],
});

export default router;
