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',
            'RouteExtendedList',
            'RouteAutonomous',
            'RouteRoadmap',
            'CmrList',
            'AgencyList',
        ],
        card: ['RouteBasicData', 'RouteTickets', 'RouteLog'],
    },
    children: [
        {
            path: '/route',
            name: 'RouteMain',
            component: () => import('src/components/common/VnSectionMain.vue'),
            redirect: { name: 'RouteList' },
            children: [
                {
                    path: 'list',
                    name: 'RouteList',
                    meta: {
                        title: 'RouteList',
                        icon: 'view_list',
                    },
                    component: () => import('src/pages/Route/RouteList.vue'),
                },
                {
                    path: 'extended-list',
                    name: 'RouteExtendedList',
                    meta: {
                        title: 'RouteExtendedList',
                        icon: 'format_list_bulleted',
                    },
                    component: () => import('src/pages/Route/RouteExtendedList.vue'),
                },
                {
                    path: 'create',
                    name: 'RouteCreate',
                    meta: {
                        title: 'routeCreate',
                        icon: 'add',
                    },
                    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: 'cmr',
                    name: 'CmrList',
                    meta: {
                        title: 'cmrsList',
                        icon: 'fact_check',
                    },
                    component: () => import('src/pages/Route/Cmr/CmrList.vue'),
                },
                {
                    path: '/agency',
                    redirect: { name: 'AgencyList' },
                    children: [
                        {
                            path: 'list',
                            name: 'AgencyList',
                            meta: {
                                title: 'agencyList',
                                icon: 'list',
                            },
                            component: () =>
                                import('src/pages/Route/Agency/AgencyList.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'),
                },
            ],
        },
    ],
};
