import { RouterView } from 'vue-router';

export default {
    path: '/entry',
    name: 'Entry',
    meta: {
        title: 'entries',
        icon: 'vn:entry',
        moduleName: 'Entry',
        keyBinding: 'e',
    },
    component: RouterView,
    redirect: { name: 'EntryMain' },
    menus: {
        main: [
            'EntryList',
            'MyEntries',
            'EntryLatestBuys',
            'EntryStockBought',
            'EntryWasteRecalc',
        ],
        card: ['EntryBasicData', 'EntryBuys', 'EntryNotes', 'EntryDms', 'EntryLog'],
    },
    children: [
        {
            path: '',
            name: 'EntryMain',
            component: () => import('src/components/common/VnSectionMain.vue'),
            redirect: { name: 'EntryList' },
            children: [
                {
                    path: 'list',
                    name: 'EntryList',
                    meta: {
                        title: 'list',
                        icon: 'view_list',
                    },
                    component: () => import('src/pages/Entry/EntryList.vue'),
                },
                {
                    path: 'my',
                    name: 'MyEntries',
                    meta: {
                        title: 'labeler',
                        icon: 'sell',
                    },
                    component: () => import('src/pages/Entry/MyEntries.vue'),
                },
                {
                    path: 'create',
                    name: 'EntryCreate',
                    meta: {
                        title: 'entryCreate',
                        icon: 'add',
                    },
                    component: () => import('src/pages/Entry/EntryCreate.vue'),
                },
                {
                    path: 'latest-buys',
                    name: 'EntryLatestBuys',
                    meta: {
                        title: 'latestBuys',
                        icon: 'contact_support',
                    },
                    component: () => import('src/pages/Entry/EntryLatestBuys.vue'),
                },
                {
                    path: 'stock-Bought',
                    name: 'EntryStockBought',
                    meta: {
                        title: 'reserves',
                        icon: 'deployed_code_history',
                    },
                    component: () => import('src/pages/Entry/EntryStockBought.vue'),
                },
                {
                    path: 'waste-recalc',
                    name: 'EntryWasteRecalc',
                    meta: {
                        title: 'wasteRecalc',
                        icon: 'compost',
                    },
                    component: () => import('src/pages/Entry/EntryWasteRecalc.vue'),
                },
            ],
        },
        {
            name: 'EntryCard',
            path: ':id',
            component: () => import('src/pages/Entry/Card/EntryCard.vue'),
            redirect: { name: 'EntrySummary' },
            children: [
                {
                    name: 'EntrySummary',
                    path: 'summary',
                    meta: {
                        title: 'summary',
                        icon: 'launch',
                    },
                    component: () => import('src/pages/Entry/Card/EntrySummary.vue'),
                },
                {
                    path: 'basic-data',
                    name: 'EntryBasicData',
                    meta: {
                        title: 'basicData',
                        icon: 'vn:settings',
                    },
                    component: () => import('src/pages/Entry/Card/EntryBasicData.vue'),
                },
                {
                    path: 'buys',
                    name: 'EntryBuys',
                    meta: {
                        title: 'buys',
                        icon: 'vn:lines',
                    },
                    component: () => import('src/pages/Entry/Card/EntryBuys.vue'),
                },
                {
                    path: 'buys/import',
                    name: 'EntryBuysImport',
                    component: () => import('src/pages/Entry/Card/EntryBuysImport.vue'),
                },
                {
                    path: 'notes',
                    name: 'EntryNotes',
                    meta: {
                        title: 'notes',
                        icon: 'vn:notes',
                    },
                    component: () => import('src/pages/Entry/Card/EntryNotes.vue'),
                },
                {
                    path: 'dms',
                    name: 'EntryDms',
                    meta: {
                        title: 'dms',
                        icon: 'smb_share',
                    },
                    component: () => import('src/pages/Entry/Card/EntryDms.vue'),
                },
                {
                    path: 'log',
                    name: 'EntryLog',
                    meta: {
                        title: 'log',
                        icon: 'vn:History',
                    },
                    component: () => import('src/pages/Entry/Card/EntryLog.vue'),
                },
            ],
        },
    ],
};
