<form id="lock-page" (ngSubmit)="submit()">
  <div class="content">
    <p aria-hidden="true"><i class="bwi bwi-lock bwi-4x text-muted"></i></p>
    <p>{{ "yourVaultIsLocked" | i18n }}</p>
    <div class="box last">
      <div class="box-content">
        <div
          class="box-content-row box-content-row-flex"
          appBoxRow
          *ngIf="pinEnabled || masterPasswordEnabled"
        >
          <div class="row-main" *ngIf="pinEnabled">
            <label for="pin">{{ "pin" | i18n }}</label>
            <input
              id="pin"
              type="{{ showPassword ? 'text' : 'password' }}"
              name="PIN"
              class="monospaced"
              [(ngModel)]="pin"
              required
              appInputVerbatim
            />
          </div>
          <div class="row-main" *ngIf="masterPasswordEnabled && !pinEnabled">
            <label for="masterPassword">{{ "masterPass" | i18n }}</label>
            <input
              id="masterPassword"
              type="{{ showPassword ? 'text' : 'password' }}"
              name="MasterPassword"
              aria-describedby="masterPasswordHelp"
              class="monospaced"
              [(ngModel)]="masterPassword"
              required
              appInputVerbatim
            />
          </div>
          <div class="action-buttons">
            <button
              type="button"
              class="row-btn"
              appStopClick
              appA11yTitle="{{ 'toggleVisibility' | i18n }}"
              [attr.aria-pressed]="showPassword"
              (click)="togglePassword()"
            >
              <i
                class="bwi bwi-lg"
                aria-hidden="true"
                [ngClass]="{ 'bwi-eye': !showPassword, 'bwi-eye-slash': showPassword }"
              ></i>
            </button>
          </div>
        </div>
      </div>
      <div id="masterPasswordHelp" class="box-footer">
        {{ "loggedInAsOn" | i18n: email : webVaultHostname }}
      </div>
    </div>
    <div class="buttons with-rows">
      <div class="buttons-row" *ngIf="supportsBiometric && biometricLock && biometricReady">
        <button
          type="button"
          class="btn block"
          [ngClass]="{ 'primary font-weight-bold': !pinEnabled && !masterPasswordEnabled }"
          (click)="unlockBiometric()"
        >
          {{ biometricText | i18n }}
        </button>
      </div>
      <div class="buttons-row">
        <button type="submit" class="btn primary block" *ngIf="pinEnabled || masterPasswordEnabled">
          <i class="bwi bwi-unlock" aria-hidden="true"></i> <b>{{ "unlock" | i18n }}</b>
        </button>
        <button type="button" class="btn block" (click)="logOut()">
          {{ "logOut" | i18n }}
        </button>
      </div>
    </div>
  </div>
</form>
