import { Injectable } from '@angular/core';
import { Resolve, ActivatedRouteSnapshot } from '@angular/router';
import { Observable } from 'rxjs';

@Injectable({ providedIn: 'root' })
export class ProcessIdResolver implements Resolve<number> {
  constructor() {}

  resolve(route: ActivatedRouteSnapshot): Observable<number> | Promise<number> | number {
    return route.params.processId;
  }
}
