import { CommonModule } from '@angular/common';
import { Component, ViewChild } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { TranslateModule } from '@ngx-translate/core';
import { PasswordHideShowComponent } from '../../shared/components/password-hide-show/password-hide-show.component';

@Component({
  selector: 'app-feedback-setup',
  imports: [TranslateModule, ReactiveFormsModule, FormsModule, CommonModule, PasswordHideShowComponent],
  templateUrl: './feedback-setup.component.html',
  styleUrl: './feedback-setup.component.scss'
})
export class FeedbackSetupComponent {
  @ViewChild('psh') passwordHideShow ?: PasswordHideShowComponent
  @ViewChild('cpsh') confirmPasswordHideShow ?: PasswordHideShowComponent

  passwordType: string = 'password';
  confirmPasswordType: string = 'password';
  
  togglePasswordType(){
    this.passwordType = this.passwordHideShow?.showPassword ? 'password' : 'text';
  }
  toggleConfirmPasswordType(){
    this.confirmPasswordType = this.confirmPasswordHideShow?.showPassword ? 'password' : 'text';
  }
}
