import { RouterView } from 'vue-router';

export default {
    path: '/worker',
    name: 'Worker',
    meta: {
        title: 'workers',
        icon: 'vn:worker',
        moduleName: 'Worker',
    },
    component: RouterView,
    redirect: { name: 'WorkerMain' },
    menus: {
        main: ['WorkerList', 'WorkerDepartment'],
        card: ['WorkerNotificationsManager', 'WorkerPda'],
        departmentCard: ['BasicData'],
    },
    children: [
        {
            path: '',
            name: 'WorkerMain',
            component: () => import('src/pages/Worker/WorkerMain.vue'),
            redirect: { name: 'WorkerList' },
            children: [
                {
                    path: 'list',
                    name: 'WorkerList',
                    meta: {
                        title: 'list',
                        icon: 'view_list',
                    },
                    component: () => import('src/pages/Worker/WorkerList.vue'),
                },
                {
                    path: 'department',
                    name: 'WorkerDepartment',
                    meta: {
                        title: 'department',
                        icon: 'vn:greuge',
                    },
                    component: () => import('src/pages/Worker/WorkerDepartment.vue'),
                },
                {
                    path: 'create',
                    name: 'WorkerCreate',
                    meta: {
                        title: 'workerCreate',
                        icon: '',
                    },
                    component: () => import('src/pages/Worker/WorkerCreate.vue'),
                },
            ],
        },
        {
            name: 'WorkerCard',
            path: ':id',
            component: () => import('src/pages/Worker/Card/WorkerCard.vue'),
            redirect: { name: 'WorkerSummary' },
            children: [
                {
                    name: 'WorkerSummary',
                    path: 'summary',
                    meta: {
                        title: 'summary',
                        icon: 'launch',
                    },
                    component: () => import('src/pages/Worker/Card/WorkerSummary.vue'),
                },
                {
                    name: 'WorkerNotificationsManager',
                    path: 'notifications',
                    meta: {
                        title: 'notifications',
                        icon: 'notifications',
                    },
                    component: () =>
                        import('src/pages/Worker/Card/WorkerNotificationsManager.vue'),
                },
                {
                    name: 'WorkerPda',
                    path: 'pda',
                    meta: {
                        title: 'pda',
                        icon: 'phone_android',
                    },
                    component: () => import('src/pages/Worker/Card/WorkerPda.vue'),
                },
            ],
        },
    ],
};
