import { Injectable } from '@angular/core';
import { PackageInspectionModule } from '../package-inspection.module';
import { Params, Router } from '@angular/router';

export interface Navigation {
  path: any[];
  queryParams?: Params;
  navigate: () => Promise<boolean>;
}

@Injectable({ providedIn: 'root' })
export class PackageInspectionNavigationService {
  constructor(private _router: Router) {}

  details(id: string): Navigation {
    const path = [`/filiale/package-inspection/packages/${id}`];

    return {
      path,
      navigate: () => this._router.navigate(path),
    };
  }
}
