import { RouterView } from 'vue-router';

export default {
    path: '/order',
    name: 'Order',
    meta: {
        title: 'order',
        icon: 'vn:basket',
        moduleName: 'Order',
    },
    component: RouterView,
    redirect: { name: 'OrderMain' },
    menus: {
        main: ['OrderList'],
        card: ['OrderBasicData', 'OrderCatalog', 'OrderVolume', 'OrderLines'],
    },
    children: [
        {
            path: '',
            name: 'OrderMain',
            component: () => import('src/pages/Order/OrderMain.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: 'create',
                    },
                    component: () => import('src/pages/Order/Card/OrderForm.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/OrderForm.vue'),
                },
                {
                    name: 'OrderCatalog',
                    path: 'catalog',
                    meta: {
                        title: 'catalog',
                        icon: 'vn:basket',
                    },
                    component: () => import('src/pages/Order/OrderCatalog.vue'),
                },
                {
                    name: 'OrderVolume',
                    path: 'volume',
                    meta: {
                        title: 'volume',
                        icon: 'vn:volume',
                    },
                    component: () => import('src/pages/Order/OrderVolume.vue'),
                },
                {
                    name: 'OrderLines',
                    path: 'line',
                    meta: {
                        title: 'lines',
                        icon: 'vn:lines',
                    },
                    component: () => import('src/pages/Order/OrderLines.vue'),
                },
            ],
        },
    ],
};
