import { RouterView } from 'vue-router';

export default {
    path: '/shelving',
    name: 'Shelving',
    meta: {
        title: 'shelving',
        icon: 'vn:inventory',
        moduleName: 'Shelving',
    },
    component: RouterView,
    redirect: { name: 'ShelvingMain' },
    menus: {
        main: ['ShelvingList'],
        card: ['ShelvingBasicData', 'ShelvingLog'],
    },
    children: [
        {
            path: '',
            name: 'ShelvingMain',
            component: () => import('src/pages/Shelving/ShelvingMain.vue'),
            redirect: { name: 'ShelvingList' },
            children: [
                {
                    path: 'list',
                    name: 'ShelvingList',
                    meta: {
                        title: 'shelvingList',
                        icon: 'view_list',
                    },
                    component: () => import('src/pages/Shelving/ShelvingList.vue'),
                },
                {
                    path: 'create',
                    name: 'ShelvingCreate',
                    meta: {
                        title: 'create',
                    },
                    component: () => import('src/pages/Shelving/Card/ShelvingForm.vue'),
                },
            ],
        },
        {
            name: 'ShelvingLayout',
            path: ':id',
            component: () => import('pages/Shelving/Card/ShelvingCard.vue'),
            redirect: { name: 'ShelvingSummary' },
            children: [
                {
                    name: 'ShelvingSummary',
                    path: 'summary',
                    meta: {
                        title: 'summary',
                    },
                    component: () => import('pages/Shelving/Card/ShelvingSummary.vue'),
                },
                {
                    name: 'ShelvingBasicData',
                    path: 'basic-data',
                    meta: {
                        title: 'basicData',
                        icon: 'vn:settings',
                        roles: ['salesPerson'],
                    },
                    component: () => import('pages/Shelving/Card/ShelvingForm.vue'),
                },
                {
                    name: 'ShelvingLog',
                    path: 'log',
                    meta: {
                        title: 'log',
                        icon: 'history',
                    },
                    component: () => import('src/pages/Shelving/Card/ShelvingLog.vue'),
                },
            ],
        },
    ],
};
