import scopes from '@utils/scopes';
import { USER_SCOPES } from '@constants/entities/Scope';
import { lazyLoadView } from '@utils/lazyloadview';
import Vue from 'vue';

const categories = {
  registriesUnloading: {
    label: 'registries.unloadingList.title',
    path: '',
    scopes: scopes.registryUnloading,
  },
};

const routes = [
  {
    children: [
      {
        component: () => import('@components/registries/unloading-list.vue'),
        meta: {
          icon: 'language',
          label: categories.registriesUnloading.label,
          place: 'drawer',
          drawerWhiteList: [
            USER_SCOPES.UNLOADING_LINK_BTN,
            USER_SCOPES.UNLOADING_CREATE,
          ],
          order: 21,
          showProd: Vue.prototype.$appConfig.isDebugMode === 'true',
        },
        name: 'registry-unloading',
        path: '/registries/unloading',
      },
    ],
    component: () =>
      lazyLoadView(import('@router/registryUnloading/index.vue')),
    meta: {
      scopes: categories.registriesUnloading.scopes,
    },
    path: categories.registriesUnloading.path,
  },
];

export default routes;
