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

const categories = {
  signedApplications: {
    label: 'signedApplications.label',
    path: 'signed-applications',
    scopes: scopes.signedApplications,
  },
};

const routes = [
  {
    children: [
      {
        component: () => import('@components/signed-applications/index.vue'),
        meta: {
          icon: 'drive_file_rename_outline',
          label: categories.signedApplications.label,
          place: 'drawer',
          order: 10,
          showProd: Vue.prototype.$appConfig.isDebugMode === 'true',
        },
        name: 'signedApplications',
        path: '',
        props: (route) => {
          return {
            searchQuery: {
              ...route.query
            },
          };
        },
      },
    ],
    component: () =>
      lazyLoadView(import('@router/signed-applications/index.vue')),
    meta: {
      scopes: categories.signedApplications.scopes,
    },
    path: categories.signedApplications.path,
  },
];

export default routes;
