import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router";

import { authGuard } from './plugins/authGuard'


const routes: RouteRecordRaw[] = [
    {
        path: "/",
        redirect: "/photography/check"
    },
    {
        path: "/home",
        name: "home",
        component: () => import("@/views/Home/index.vue"),
        meta: {
            noAuth: true,
        },
    },
    {
        path: "/setting",
        name: "setting",
        component: () => import("@/views/Setting/index.vue"),
        meta: {
            title: '设置'
        }
    },
    {
        path: "/photography/check",
        name: "PhotographyCheck",
        component: () => import("@/views/Photography/check.vue"),
        meta: {
            title: '拍摄物体镜头矫正'
        }
    },
    {
        path: "/photography/shot",
        name: "PhotographyShot",
        component: () => import("@/views/Photography/shot.vue"),
    },
    {
        path: "/photography/detail",
        name: "PhotographyDetail",
        component: () => import("@/views/Photography/detail.vue"),
    },
    {
        path: "/photography/seniorDetail",
        name: "PhotographySeniorDetail",
        component: () => import("@/views/Photography/seniorDetail.vue"),
    },
];




const router = createRouter({
    history: createWebHistory(),
    routes
});

authGuard(router)

export default router;
