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

@Component({
  selector: 'app-task',
  templateUrl: './task.component.html',
  styleUrls: ['./task.component.scss'],
})
export class TaskComponent {
  constructor(
    private readonly router: Router,
    private readonly route: ActivatedRoute
  ) {}
  @Input() value: number = 0;

  onOpenTaskDetail(): void {
    this.router.navigate(['./details'], { relativeTo: this.route });
  }
}
