<ng-container *transloco="let t; prefix: 'confirm-reset-password'">
  <app-splash-container>
    <ng-container title><h2>{{t('title')}}</h2></ng-container>
    <ng-container body>
      <p>{{t('description')}}</p>
      <form [formGroup]="registerForm" (ngSubmit)="submit()">
        <div class="mb-3">
          <label for="password" class="form-label">{{t('password-label')}}</label>&nbsp;<i class="fa fa-info-circle" placement="right" [ngbTooltip]="passwordTooltip" role="button" tabindex="0"></i>
          <ng-template #passwordTooltip>
            {{t('password-validation')}}
          </ng-template>
          <span class="visually-hidden" id="password-help"><ng-container [ngTemplateOutlet]="passwordTooltip" /></span>
          <input id="password" class="form-control" maxlength="256" minlength="6" formControlName="password" type="password" aria-describedby="password-help">
          @if (registerForm.dirty || registerForm.touched) {
            <div id="inviteForm-validations" class="invalid-feedback">
              @if (registerForm.get('password')?.errors?.required) {
                <div>
                  {{t('required-field')}}
                </div>
              }
              @if (registerForm.get('password')?.errors?.minlength || registerForm.get('password')?.errors?.maxLength) {
                <div>
                  {{t('password-validation')}}
                </div>
              }
            </div>
          }
        </div>

        <div class="float-end">
          <button class="btn btn-secondary alt" type="submit">{{t('submit')}}</button>
        </div>
      </form>
    </ng-container>
  </app-splash-container>

</ng-container>
