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

@Component({
  selector: 'app-signature',
  templateUrl: './signature.component.html',
  styleUrls: ['./signature.component.scss']
})
export class SignatureComponent {
  selectedFirst = false; 
  selectedSecond = false; 
  selectedThird = false; 

      constructor(private router: Router, private routerActive :  ActivatedRoute){        
        const filePath: string = this.router.url;
        const segments: string[] = filePath.split("/");
        const lastSegment: string = segments[segments.length - 1];
        console.log(lastSegment)
        if(lastSegment == "signer")
          this.selectedThird = true;
        else if(lastSegment == "suivi-signature")
          this.selectedSecond = true;
        else
        this.selectedFirst = true;
    }
      
    getSelected(){

    }

    redirect(url : string){
      this.router.navigate([url]);
    } 
}
