import { Routes } from '@angular/router';

import { UserRouteAccessService } from 'app/core/auth/user-route-access.service';
import { ASC } from 'app/config/navigation.constants';

import { SecurityGroupComponent } from './list/security-group.component';
import { SecurityGroupUpdateComponent } from './update/security-group-update.component';
/*
import { SecurityGroupPreviewComponent } from './preview/security-group-preview.component';
import { SecurityGroupDetailComponent } from './detail/security-group-detail.component';
*/
import SecurityGroupResolve from './route/security-group-routing-resolve.service';

const securityGroupRoute: Routes = [
  {
    path: '',
    component: SecurityGroupComponent,
    data: {
      defaultSort: 'id,' + ASC,
    },
    canActivate: [UserRouteAccessService],
  },
/*
  {
    path: ':id/view',
    component: DashboardComponentDetailComponent,
    resolve: {
      dashboardComponent: DashboardComponentResolve,
    },
    canActivate: [UserRouteAccessService],
  },
  {
    path: ':id/preview',
    component: DashboardComponentPreviewComponent,
    resolve: {
      dashboardComponent: DashboardComponentResolve,
    },
    canActivate: [UserRouteAccessService],
  },
*/
  {
    path: 'new',
    component: SecurityGroupUpdateComponent,
    resolve: {
      securityGroup: SecurityGroupResolve,
    },
    canActivate: [UserRouteAccessService],
  },
  {
    path: ':id/edit',
    component: SecurityGroupUpdateComponent,
    resolve: {
      securityGroup: SecurityGroupResolve,
    },
    canActivate: [UserRouteAccessService],
  },
];

export default securityGroupRoute;
