import { RouterView } from 'vue-router';

export default {
    path: '/route',
    name: 'Route',
    meta: {
        title: 'routes',
        icon: 'vn:delivery',
        moduleName: 'Route',
    },
    component: RouterView,
    redirect: { name: 'RouteMain' },
    menus: {
        main: ['RouteList', 'RouteAutonomous', 'RouteRoadmap', 'CmrList'],
        card: ['RouteBasicData', 'RouteTickets', 'RouteLog'],
    },
    children: [
        {
            path: '/route',
            name: 'RouteMain',
            component: () => import('src/pages/Route/RouteMain.vue'),
            redirect: { name: 'RouteList' },
            children: [
                {
                    path: 'list',
                    name: 'RouteList',
                    meta: {
                        title: 'RouteList',
                        icon: 'view_list',
                    },
                    component: () => import('src/pages/Route/RouteList.vue'),
                },
                {
                    path: 'create',
                    name: 'RouteCreate',
                    meta: {
                        title: 'create',
                    },
                    component: () => import('src/pages/Route/Card/RouteForm.vue'),
                },
                {
                    path: 'agency-term',
                    name: 'RouteAutonomous',
                    meta: {
                        title: 'autonomous',
                        icon: 'vn:agency-term',
                    },
                    component: () => import('src/pages/Route/RouteAutonomous.vue'),
                },
                {
                    path: 'roadmap',
                    name: 'RouteRoadmap',
                    meta: {
                        title: 'RouteRoadmap',
                        icon: 'vn:troncales',
                    },
                    component: () => import('src/pages/Route/RouteRoadmap.vue'),
                },
                {
                    path: 'roadmap/create',
                    name: 'RouteRoadmapCreate',
                    meta: {
                        title: 'RouteRoadmapCreate',
                        icon: 'vn:troncales',
                    },
                    component: () => import('src/pages/Route/Roadmap/RoadmapCreate.vue'),
                },
                {
                    path: 'cmr',
                    name: 'CmrList',
                    meta: {
                        title: 'cmrsList',
                        icon: 'fact_check',
                    },
                    component: () => import('src/pages/Route/Cmr/CmrList.vue'),
                },
            ],
        },
        {
            name: 'RouteCard',
            path: ':id',
            component: () => import('src/pages/Route/Card/RouteCard.vue'),
            redirect: { name: 'RouteSummary' },
            children: [
                {
                    name: 'RouteBasicData',
                    path: 'basic-data',
                    meta: {
                        title: 'basicData',
                        icon: 'vn:settings',
                    },
                    component: () => import('pages/Route/Card/RouteForm.vue'),
                },
                {
                    name: 'RouteSummary',
                    path: 'summary',
                    meta: {
                        title: 'summary',
                        icon: 'open_in_new',
                    },
                    component: () => import('pages/Route/Card/RouteSummary.vue'),
                },
                {
                    path: 'tickets',
                    name: 'RouteTickets',
                    meta: {
                        title: 'tickets',
                        icon: 'vn:ticket',
                    },
                    component: () => import('src/pages/Route/RouteTickets.vue'),
                },
                {
                    path: 'log',
                    name: 'RouteLog',
                    meta: {
                        title: 'log',
                        icon: 'vn:History',
                    },
                    component: () => import('src/pages/Route/RouteLog.vue'),
                },
            ],
        },
    ],
};
