import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { ApiAuthComponent } from './components/api-auth/api-auth.component';
import { MenuManagerComponentsIndexComponent } from './components/index/index.component';

const routes: Routes = [
  { path: '', redirectTo: 'index', pathMatch: 'full' },
  {
    path: 'index',
    component: MenuManagerComponentsIndexComponent,
    data: { guard: { ability: ['MENU-INDEX-obclist', 'MENU-INDEX-smclist'] } }
  },
  { path: 'auth', component: ApiAuthComponent, data: { guard: { ability: ['MENU-AUTH-obclist', 'MENU-AUTH-smclist'] } } }
];

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