import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { IRouteConfig } from '@shared/ui-api/interfaces/route-config/route-config';

const routes: Routes = [
  {
    path: '',
    loadChildren: () => import('./cloud/cloud.module').then(mod => mod.CloudModule),
  },
  {
    path: 'configurations',
    loadChildren: () => import('./configurations/configurations.module').then(mod => mod.ConfigurationsModule),
  },
  {
    path: 'general',
    loadChildren: () => import('./general/general.module').then(mod => mod.GeneralModule),
  },
  {
    path: 'openstack',
    data: {
      config: {
        getBreadCrumbDetail: () => $localize`OpenStack`,
      } as IRouteConfig
    },
    loadChildren: () => import('./openstack/openstack.module').then(mod => mod.OpenstackModule),
  },
  {
    path: 'message-templates',
    loadChildren: () => import('./message-templates/message-templates.module').then(
      mod => mod.MessageTemplatesModule
    ),
  },
  {
    path: 'authorization',
    loadChildren: () => import('./authorization/authorization.module').then(mod => mod.AuthorizationModule),
  },
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule],
})
export class SettingsRoutingModule {
}
