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

const routes: Array<RouteRecordRaw> = [
    {
        path: '/login',
        name: 'Login',
        component: () => import(/* webpackChunkName: "login" */ '@/views/login/Login.vue'),
    },
    {
        path: '/',
        name: 'Main',
        component: () => import(/* webpackChunkName: "main" */ '@/views/main/Main.vue'),
        children: [
            {
                path: '',
                name: 'Dashboard',
                component: () => import(/* webpackChunkName: "dashboard" */ '@/views/main/dashboard/Dashboard.vue'),
            },
            {
                path: '/projects',
                name: 'ProjectList',
                component: () => import(/* webpackChunkName: "projects" */ '@/views/main/project-list/ProjectList.vue'),
            },
            {
                path: '/ration',
                name: 'Ration',
                component: () => import(/* webpackChunkName: "ration" */ '@/views/main/ration/Ration.vue'),
            },
            {
                path: '/project',
                name: 'Project',
                component: () => import(/* webpackChunkName: "project" */ '@/views/project/Project.vue'),
                children: [
                    {
                        path: '',
                        name: 'Overview',
                        component: () => import(/* webpackChunkName: "overview" */ '@/views/project/overview/Overview.vue'),
                    },
                    {
                        path: 'process',
                        name: 'Process',
                        component: () => import(/* webpackChunkName: "overview" */ '@/views/project/process/Process.vue'),
                    },
                    {
                        path: 'summary',
                        name: 'Summary',
                        component: () => import(/* webpackChunkName: "overview" */ '@/views/project/summary/Summary.vue'),
                    },
                    {
                        path: 'report',
                        name: 'Report',
                        component: () => import(/* webpackChunkName: "overview" */ '@/views/project/report/Report.vue'),
                    },
                ]
            }
        ]
    },

];

const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes,
});

export default router;
