import { Component, OnInit } from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';

@Component({
  selector: 'of-pages-sensor',
  templateUrl: './sensor-page.component.html',
})
export class SensorPageComponent implements OnInit {

  tabs = undefined;

  constructor(private route: ActivatedRoute, private router: Router) {
  }

  ngOnInit() {
    const id = this.router.url.split('sensor/')[1].split('/')[0];

    this.tabs = [
      { label: 'INFO', routerLink: ['/sensor/' + id, 'info'] },
      { label: 'HISTORY', path:  ['/sensor/' + id, 'history'], disabled: true },
    ];
  }

}
