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

const categories = {
  notificationTemplates: {
    label: 'Шаблоны оповещений',
    path: 'notificationTemplates',
    scopes: scopes.notificationTemplates,
  },
};

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

export default routes;
