import { RouterView } from 'vue-router';

export default {
    path: 'account/role',
    name: 'Role',
    meta: {
        title: 'role',
        icon: 'vn:greuge',
        moduleName: 'Role',
    },
    component: RouterView,
    redirect: { name: 'AccountRoles' },
    menus: {
        main: [],
        card: ['RoleBasicData', 'SubRoles', 'InheritedRoles', 'RoleLog'],
    },
    children: [
        {
            name: 'RoleCard',
            path: ':id',
            component: () => import('src/pages/Account/Role/Card/RoleCard.vue'),
            redirect: { name: 'RoleSummary' },
            children: [
                {
                    name: 'RoleSummary',
                    path: 'summary',
                    meta: {
                        title: 'summary',
                        icon: 'launch',
                    },
                    component: () =>
                        import('src/pages/Account/Role/Card/RoleSummary.vue'),
                },
                {
                    name: 'RoleBasicData',
                    path: 'basic-data',
                    meta: {
                        title: 'basicData',
                        icon: 'vn:settings',
                    },
                    component: () =>
                        import('src/pages/Account/Role/Card/RoleBasicData.vue'),
                },
                {
                    name: 'SubRoles',
                    path: 'sub-roles',
                    meta: {
                        title: 'subRoles',
                        icon: 'group',
                    },
                    component: () => import('src/pages/Account/Role/Card/SubRoles.vue'),
                },

                {
                    name: 'InheritedRoles',
                    path: 'inherited-roles',
                    meta: {
                        title: 'inheritedRoles',
                        icon: 'account_tree',
                    },
                    component: () =>
                        import('src/pages/Account/Role/Card/InheritedRoles.vue'),
                },
                {
                    name: 'RoleLog',
                    path: 'log',
                    meta: {
                        title: 'log',
                        icon: 'history',
                    },
                    component: () => import('src/pages/Account/Role/Card/RoleLog.vue'),
                },
            ],
        },
    ],
};
