import { Component, OnDestroy } from '@angular/core';
import { Router, ActivatedRoute, NavigationEnd } from '@angular/router';
import { Target } from '@overflow/commons-typescript/model/target';
import { BreadcrumbService } from '@app/commons/service/breadcrumb.service';

@Component({
  selector: 'of-pages-probe-detail',
  templateUrl: './probe-detail-page.component.html',
})
export class ProbeDetailPageComponent {

  isDetail: boolean;
  probeHostID: string;

  constructor(
    private router: Router,
    private route: ActivatedRoute,
    private breadcrumbService: BreadcrumbService
  ) {
    this.route.params.subscribe(params => {
      this.probeHostID = params['id'];
    });
  }

  onTargetSelect(target: Target) {
    console.log(target);
  }

  onDiscovery(probeHostID: number) {
    this.router.navigate(['discovery', probeHostID]);
  }

  onBack() {
    this.router.navigate
  }
}
