<h2 mat-dialog-title style="text-align: center;">Reasignar contraseña</h2>
<mat-dialog-content>
    <form [formGroup]="newPassword">
        <mat-form-field class="full-width mt-8" appearance="outline">
            <mat-label>ID Usuario</mat-label>
            <input matInput placeholder="" formControlName="id" [readonly]="true">
        </mat-form-field>
        <mat-form-field class="full-width mt-8" appearance="outline">
            <mat-label>Contraseña</mat-label>
            <input matInput placeholder="Ingrese una contraseña" [type]="hide ? 'password' : 'text'" formControlName="password">
            <button mat-icon-button matSuffix (click)="hide = !hide">
                <mat-icon>{{hide ? 'visibility_off' : 'visibility'}}</mat-icon>
            </button>
            <mat-error *ngIf="newPassword.invalid">{{ getErrorMessage("password") }}</mat-error>
        </mat-form-field>
        <mat-form-field class="full-width mt-8" appearance="outline">
            <mat-label>Confirmar Contraseña</mat-label>
            <input matInput placeholder="Ingrese de nuevo su contraseña" [type]="hide ? 'password' : 'text'" formControlName="password_confirmation"
            [errorStateMatcher]="passMatcher">
            <button mat-icon-button matSuffix (click)="hide = !hide">
                <mat-icon>{{hide ? '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>
