import { RouterView } from 'vue-router';

export default {
    path: '/zone',
    name: 'Zone',
    meta: {
        title: 'zones',
        icon: 'vn:zone',
        moduleName: 'Zone',
        keyBinding: 'z',
    },
    component: RouterView,
    redirect: { name: 'ZoneMain' },
    menus: {
        main: [
            'ZoneList',
            'ZoneDeliveryDays',
            'ZoneUpcomingList',
            'ZoneUpcomingDeliveries',
        ],
        card: [
            'ZoneBasicData',
            'ZoneWarehouses',
            'ZoneHistory',
            'ZoneLocations',
            'ZoneEvents',
        ],
    },
    children: [
        {
            path: '/zone',
            name: 'ZoneMain',
            component: () => import('src/components/common/VnSectionMain.vue'),
            redirect: { name: 'ZoneList' },
            children: [
                {
                    path: 'list',
                    name: 'ZoneList',
                    meta: {
                        title: 'zonesList',
                        icon: 'vn:zone',
                    },
                    component: () => import('src/pages/Zone/ZoneList.vue'),
                },
                {
                    path: 'delivery-days',
                    name: 'ZoneDeliveryDays',
                    meta: {
                        title: 'deliveryDays',
                        icon: 'vn:calendar',
                    },
                    component: () => import('src/pages/Zone/ZoneDeliveryDays.vue'),
                },
                {
                    name: 'ZoneUpcomingDeliveries',
                    path: 'upcoming-deliveries',
                    meta: {
                        title: 'upcomingDeliveries',
                        icon: 'vn:calendar',
                    },
                    component: () => import('src/pages/Zone/ZoneUpcoming.vue'),
                },
            ],
        },
        {
            name: 'ZoneCard',
            path: ':id',
            component: () => import('src/pages/Zone/Card/ZoneCard.vue'),
            redirect: { name: 'ZoneSummary' },
            children: [
                {
                    name: 'ZoneSummary',
                    path: 'summary',
                    meta: {
                        title: 'summary',
                        icon: 'launch',
                    },
                    component: () => import('src/pages/Zone/Card/ZoneSummary.vue'),
                },
                {
                    name: 'ZoneBasicData',
                    path: 'basic-data',
                    meta: {
                        title: 'basicData',
                        icon: 'vn:settings',
                    },
                    component: () => import('src/pages/Zone/Card/ZoneBasicData.vue'),
                },
                {
                    name: 'ZoneLocations',
                    path: 'location',
                    meta: {
                        title: 'locations',
                        icon: 'my_location',
                    },
                    component: () => import('src/pages/Zone/Card/ZoneLocations.vue'),
                },
                {
                    name: 'ZoneWarehouses',
                    path: 'warehouses',
                    meta: {
                        title: 'warehouses',
                        icon: 'home',
                    },
                    component: () => import('src/pages/Zone/Card/ZoneWarehouses.vue'),
                },
                {
                    name: 'ZoneHistory',
                    path: 'history',
                    meta: {
                        title: 'log',
                        icon: 'history',
                    },
                    component: () => import('src/pages/Zone/Card/ZoneLog.vue'),
                },
                {
                    name: 'ZoneEvents',
                    path: 'events',
                    meta: {
                        title: 'calendar',
                        icon: 'vn:calendar',
                    },
                    component: () => import('src/pages/Zone/Card/ZoneEvents.vue'),
                },
            ],
        },
    ],
};
