<form nz-form [formGroup]="form" (ngSubmit)="submit()" role="form">
  <nz-tabset [nzAnimated]="false" class="tabs" (nzSelectChange)="switch($event)">
    <nz-tab [nzTitle]="'app.login.tab-login-credentials' | i18n">
      <nz-alert *ngIf="error" [nzType]="'error'" [nzMessage]="error" [nzShowIcon]="true" class="mb-lg"></nz-alert>
      <nz-form-item>
        <nz-form-control nzErrorTip="Please enter username: admin or user">
          <nz-input-group nzSize="large" nzPrefixIcon="user">
            <input nz-input formControlName="userName" placeholder="username: admin or user" />
          </nz-input-group>
        </nz-form-control>
      </nz-form-item>
      <nz-form-item>
        <nz-form-control nzErrorTip="Please enter password">
          <nz-input-group nzSize="large" nzPrefixIcon="lock">
            <input nz-input type="password" formControlName="password" placeholder="password: admin" />
          </nz-input-group>
        </nz-form-control>
      </nz-form-item>
    </nz-tab>
  </nz-tabset>
  <nz-form-item>
    <nz-col [nzSpan]="12">
      <label nz-checkbox formControlName="remember">{{ 'app.login.remember-me' | i18n }}</label>
    </nz-col>
  </nz-form-item>
  <nz-form-item>
    <button nz-button type="submit" nzType="primary" nzSize="large" [nzLoading]="loading" nzBlock>
      {{ 'app.login.login' | i18n }}
    </button>
  </nz-form-item>
</form>
