<h2 mat-dialog-title class="prevent-select">Reasignar contraseña</h2>
<mat-dialog-content class="prevent-select">
  <form [formGroup]="newPassword">
    <mat-form-field class="w-100 mt-8" appearance="outline">
      <mat-label>ID Usuario</mat-label>
      <input matInput placeholder="" formControlName="id" [readonly]="true">
    </mat-form-field>
    <mat-form-field class="w-100 mt-8" appearance="outline">
      <mat-label>Contraseña</mat-label>
      <input matInput placeholder="Ingrese una contraseña" [type]="hidePassword ? 'password' : 'text'" formControlName="password" 
      [errorStateMatcher]="generalMatcher!">
      <button mat-icon-button matSuffix (click)="hidePassword = !hidePassword">
        <mat-icon>{{hidePassword ? 'visibility_off' : 'visibility'}}</mat-icon>
      </button>
      <mat-error *ngIf="newPassword.invalid">{{ getErrorMessage("password") }}</mat-error>
    </mat-form-field>
    <mat-form-field class="w-100 mt-8" appearance="outline">
      <mat-label>Confirmar Contraseña</mat-label>
      <input matInput placeholder="Ingrese de nuevo su contraseña" [type]="hideConfirmPassword ? 'password' : 'text'" formControlName="password_confirmation"
      [errorStateMatcher]="samePassMatcher!">
      <button mat-icon-button matSuffix (click)="hideConfirmPassword = !hideConfirmPassword">
        <mat-icon>{{hideConfirmPassword ? 'visibility_off' : 'visibility'}}</mat-icon>
      </button>
      <mat-error *ngIf="newPassword.invalid">
        {{ getErrorMessage("password_confirmation") }}
      </mat-error>
    </mat-form-field>
  </form>
</mat-dialog-content>
<mat-dialog-actions align="end">
  <button mat-button mat-dialog-close cdkFocusInitial>Cancelar</button>
  <button mat-button [mat-dialog-close]="newPassword.getRawValue()" [disabled]="!newPassword.valid">Guardar</button>
</mat-dialog-actions>
