import { RouterView } from 'vue-router';

export default {
    path: '/travel',
    name: 'Travel',
    meta: {
        title: 'travel',
        icon: 'local_airport',
    },
    component: RouterView,
    redirect: { name: 'TravelMain' },
    menus: {
        main: ['TravelList', 'ExtraCommunity'],
        card: ['TravelBasicData', 'TravelHistory', 'TravelThermographs'],
    },
    children: [
        {
            path: '',
            name: 'TravelMain',
            component: () => import('src/pages/Travel/TravelMain.vue'),
            redirect: { name: 'TravelList' },
            children: [
                {
                    path: 'list',
                    name: 'TravelList',
                    meta: {
                        title: 'list',
                        icon: 'view_list',
                    },
                    component: () => import('src/pages/Travel/TravelList.vue'),
                },
                {
                    path: 'extra-community',
                    name: 'ExtraCommunity',
                    meta: {
                        title: 'extraCommunity',
                        icon: 'vn:shipment-01',
                    },
                    component: () => import('src/pages/Travel/ExtraCommunity.vue'),
                },
                {
                    path: 'create',
                    name: 'TravelCreate',
                    meta: {
                        title: 'travelCreate',
                        icon: '',
                    },
                    component: () => import('src/pages/Travel/TravelCreate.vue'),
                },
            ],
        },
        {
            name: 'TravelCard',
            path: ':id',
            component: () => import('src/pages/Travel/Card/TravelCard.vue'),
            redirect: { name: 'TravelSummary' },
            children: [
                {
                    name: 'TravelSummary',
                    path: 'summary',
                    meta: {
                        title: 'summary',
                    },
                    component: () => import('src/pages/Travel/Card/TravelSummary.vue'),
                },
                {
                    name: 'TravelBasicData',
                    path: 'basic-data',
                    meta: {
                        title: 'basicData',
                        icon: 'vn:settings',
                        // roles: [],
                    },
                    // component: () => import(),
                },
                {
                    name: 'TravelHistory',
                    path: 'history',
                    meta: {
                        title: 'history',
                        icon: 'history',
                        // roles: [],
                    },
                    // component: () => import(),
                },
                {
                    name: 'TravelThermographs',
                    path: 'thermographs',
                    meta: {
                        title: 'thermographs',
                        icon: 'vn:thermometer',
                        // roles: [],
                    },
                    // component: () => import(),
                },
            ],
        },
    ],
};
