import { RouterView } from 'vue-router';

export default {
    path: '/route',
    name: 'Route',
    meta: {
        title: 'routes',
        icon: 'vn:delivery',
    },
    component: RouterView,
    redirect: { name: 'RouteMain' },
    menus: {
        main: ['RouteList', 'CmrList'],
        card: ['RouteBasicData'],
    },
    children: [
        {
            path: '/route',
            name: 'RouteMain',
            component: () => import('src/pages/Route/RouteMain.vue'),
            redirect: { name: 'RouteList' },
            children: [
                {
                    path: 'cmr',
                    name: 'CmrList',
                    meta: {
                        title: 'cmrsList',
                        icon: 'fact_check',
                    },
                    component: () => import('src/pages/Route/Cmr/CmrList.vue'),
                },
                {
                    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'),
                },
            ],
        },
        {
            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'),
                },
            ],
        },
    ],
};
