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

// Services
import { PasswordService } from '../../../services/password/password.service';
import { environment } from 'src/environments/environment';

@Component({
  standalone: false,
  selector: 'app-confirmpassword',
  templateUrl: './confirmpassword.component.html',
  styleUrls: ['./confirmpassword.component.scss']
})
export class ConfirmpasswordComponent implements OnInit {
  imgUrl: string = environment.imageUrl;

  constructor(private passwordService: PasswordService, private router: Router) { }

  ngOnInit(): void {
  }

  /**
   * redirects user to login page
   */
  goToLogin() {
    this.router.navigate(['/market/login'])
  };

  /**
   *  method to resend email to the user
   */
  resendEmail() {
    let id = this.passwordService.getuserId();
    let name = this.passwordService.getdeaName();
    this.passwordService.getPasswordAuthentication(name, id);
  };

}
