import { RouterView } from 'vue-router';

export default {
    path: '/order',
    name: 'Order',
    meta: {
        title: 'order',
        icon: 'vn:basket',
        moduleName: 'Order',
        keyBinding: 'o',
    },
    component: RouterView,
    redirect: { name: 'OrderMain' },
    menus: {
        main: ['OrderList'],
        card: ['OrderBasicData', 'OrderCatalog', 'OrderVolume', 'OrderLines'],
    },
    children: [
        {
            path: '',
            name: 'OrderMain',
            component: () => import('src/components/common/VnSectionMain.vue'),
            redirect: { name: 'OrderList' },
            children: [
                {
                    path: 'list',
                    name: 'OrderList',
                    meta: {
                        title: 'orderList',
                        icon: 'view_list',
                    },
                    component: () => import('src/pages/Order/OrderList.vue'),
                },
                {
                    path: 'create',
                    name: 'OrderCreate',
                    meta: {
                        title: 'orderCreate',
                        icon: 'add',
                    },
                    component: () => import('src/pages/Order/OrderList.vue'),
                },
            ],
        },
        {
            name: 'OrderCard',
            path: ':id',
            component: () => import('src/pages/Order/Card/OrderCard.vue'),
            redirect: { name: 'OrderSummary' },
            children: [
                {
                    name: 'OrderSummary',
                    path: 'summary',
                    meta: {
                        title: 'summary',
                        icon: 'launch',
                    },
                    component: () => import('src/pages/Order/Card/OrderSummary.vue'),
                },
                {
                    name: 'OrderBasicData',
                    path: 'basic-data',
                    meta: {
                        title: 'basicData',
                        icon: 'vn:settings',
                    },
                    component: () => import('src/pages/Order/Card/OrderBasicData.vue'),
                },
                {
                    name: 'OrderCatalog',
                    path: 'catalog',
                    meta: {
                        title: 'catalog',
                        icon: 'vn:basket',
                    },
                    component: () => import('src/pages/Order/Card/OrderCatalog.vue'),
                },
                {
                    name: 'OrderVolume',
                    path: 'volume',
                    meta: {
                        title: 'volume',
                        icon: 'vn:volume',
                    },
                    component: () => import('src/pages/Order/Card/OrderVolume.vue'),
                },
                {
                    name: 'OrderLines',
                    path: 'line',
                    meta: {
                        title: 'lines',
                        icon: 'vn:lines',
                    },
                    component: () => import('src/pages/Order/Card/OrderLines.vue'),
                },
            ],
        },
    ],
};
