import scopes from '@utils/scopes';
import { lazyLoadView } from '@utils/lazyloadview';
import Vue from 'vue';

const categories = {
  directory: {
    label: 'Справочники',
    path: 'directory',
    scopes: scopes.directory,
  },
};

const routes = [
  {
    children: [
      {
        component: () => import('@components/directory/index.vue'),
        meta: {
          icon: 'topic',
          label: categories.directory.label,
          place: 'drawer',
          showProd: Vue.prototype.$appConfig.isDebugMode === 'true',
        },
        name: 'directory',
        path: '',
      },
    ],
    component: () => lazyLoadView(import('@router/directory/index.vue')),
    meta: {
      scopes: categories.directory.scopes,
    },
    path: categories.directory.path,
  },
];

export default routes;
