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

import { UserRouteAccessService } from 'app/core/auth/user-route-access.service';
import { ASC } from 'app/config/navigation.constants';
import { InputDataUploadLogComponent } from './list/input-data-upload-log.component';
import { InputDataUploadLogDetailComponent } from './detail/input-data-upload-log-detail.component';
import { InputDataUploadLogUpdateComponent } from './update/input-data-upload-log-update.component';
import InputDataUploadLogResolve from './route/input-data-upload-log-routing-resolve.service';
import { SecurityAction } from 'app/security/security-action.model';
import { Resources } from 'app/security/resources.model';
import { InputDataUploadLogService } from './service/input-data-upload-log.service';

const inputDataUploadLogRoute: Routes = [
  {
    path: '',
    component: InputDataUploadLogComponent,
    canActivate: [UserRouteAccessService],
    data: {
      defaultSort: 'id,' + ASC,
      action: SecurityAction.READ,
      service: InputDataUploadLogService,
      resource: Resources.INPUT_DATA_UPLOAD_LOG,
      authorities: ['ROLE_ADMIN', 'ROLE_MANAGER', 'ROLE_COORDINATOR'],
    }
  },
  {
    path: ':id/view',
    component: InputDataUploadLogDetailComponent,
    resolve: {
      inputDataUploadLog: InputDataUploadLogResolve,
    },
    canActivate: [UserRouteAccessService],
    data: {
      action: SecurityAction.READ,
      service: InputDataUploadLogService,
      resource: Resources.INPUT_DATA_UPLOAD_LOG,
      authorities: ['ROLE_ADMIN', 'ROLE_MANAGER', 'ROLE_COORDINATOR'],
    }
  },
];

export default inputDataUploadLogRoute;
