import scopes from '@utils/scopes';
// @ts-ignore
import { ModelUseTypes } from '@devsun/pgs-modeler/dist/build';
import { Route } from 'vue-router/types';
import { lazyLoadView } from '@utils/lazyloadview';
import Vue from 'vue';

const categories = {
  additionalSettings: {
    label: 'additionalSettings.addSettingsTitle',
    path: 'additional-settings',
    scopes: scopes.additionalSettings,
  },
};

const routes = [
  {
    children: [
      {
        component: () => import('@components/additional-settings/index.vue'),
        meta: {
          icon: 'settings',
          label: 'additionalSettings.addSettingsTitle',
          place: 'drawer',
          order: 21,
          showProd: Vue.prototype.$appConfig.isDebugMode === 'true',
        },
        name: 'additional-settings',
        path: '',
        props: (route: Route) => {
          return {
            searchQuery: {
              status: route.query.status,
              search: route.query.search,
            },
          };
        },
      },
      // {
      //   path: 'emulation',
      //   component: () =>
      //     import('@/components/services/emulation/index.vue'),
      // },
      // {
      //   component: () => import('@/components/services/modeler/create.vue'),
      //   name: 'modeler-create',
      //   path: 'modeler/create',
      // },
      // {
      //   component: () => import('@/components/services/modeler/create.vue'),
      //   name: 'modeler-create-registry',
      //   path: 'modeler/registries/create',
      // },
      // {
      //   component: () =>
      //     import('@/components/services/modeler/service-page.vue'),
      //   name: 'modeler-service-page',
      //   path: 'modeler/service/:serviceId',
      // },
      // {
      //   path: 'modeler/service/:serviceId/model/input',
      //   component: () => import('@/components/services/modeler/model-page.vue'),
      //   props: { modelUseType: ModelUseTypes.INPUT, readOnly: true },
      // },
      // {
      //   path: 'modeler/service/:serviceId/model',
      //   component: () => import('@/components/services/modeler/model-page.vue'),
      //   props: { modelUseType: ModelUseTypes.MAIN, readOnly: false },
      // },
      // {
      //   path: 'modeler/service/:serviceId/mapper',
      //   component: () =>
      //     import('@/components/services/modeler/mapper-page.vue'),
      // },
      // {
      //   path: 'modeler/service/:serviceId/export-import',
      //   component: () =>
      //     import('@/components/services/modeler/export-import-page.vue'),
      //   props: { modelUseType: ModelUseTypes.MAIN, readonly: false },
      // },
      // {
      //   path: 'modeler/service/:serviceId/schema/:schemaId',
      //   component: () =>
      //     import('@/components/services/modeler/schema-page.vue'),
      // },
    ],
    component: () => lazyLoadView(import('@router/additional-settings/index.vue')),
    meta: {
      scopes: categories.additionalSettings.scopes,
    },
    path: categories.additionalSettings.path,
  },
];

export default routes;
