<form nz-form [formGroup]="form" (ngSubmit)="submit()" role="form" autocomplete="new-password">
  <nz-alert *ngIf="type === 0 && error && code != '651'" [nzType]="'error'" [nzMessage]="error" [nzShowIcon]="true" class="mb-lg">
  </nz-alert>
  <nz-tabset [nzAnimated]="false" class="tabs" [nzSelectedIndex]="type">
    <nz-tab [nzTitle]="'app.login.tab.forget.password' | i18n">
      <!--      <nz-form-item>-->
      <!--        <nz-form-control nzErrorTip="请输入手机号!">-->
      <!--          <nz-input-group nzSize="large" nzPrefixIcon="phone" [nzAddOnAfter]="accountSuffixIconButton">-->
      <!--            <input nz-input formControlName="account" placeholder="请输入手机号" />-->
      <!--          </nz-input-group>-->
      <!--          <ng-template #accountSuffixIconButton>-->
      <!--            <button type="button" nz-button [disabled]="mailCountDown >= 1" nzType="text" (click)="getMail()">-->
      <!--              {{ mailCountDown ? mailCountDown + 's' : '获取验证码' }}-->
      <!--            </button>-->
      <!--          </ng-template>-->
      <!--        </nz-form-control>-->
      <!--      </nz-form-item>-->
      <nz-form-item>
        <nz-form-control [nzErrorTip]="'validation.phone-number.required' | i18n">
          <nz-input-group nzSize="large" nzPrefixIcon="phone">
            <input nz-input type="text" formControlName="account" [placeholder]="'validation.phone-number.required' | i18n" />
          </nz-input-group>
        </nz-form-control>
        <button
          nz-button
          nzType="primary"
          style="width: 112px"
          type="button"
          [disabled]="btnContent >= 1"
          (click)="getCaptcha(); $event.preventDefault()"
          nzSize="large"
          >{{ btnContent == 0 ? ('ic.menu.get.captcha' | i18n) : btnContent }}</button
        >
      </nz-form-item>
      <!--      <nz-form-item [hidden]="!notifyType.includes('mail')">-->
      <!--        <nz-form-control nzErrorTip="请输入邮箱!">-->
      <!--          <nz-input-group nzSize="large" nzPrefixIcon="mail">-->
      <!--            <input nz-input type="text" formControlName="mail" placeholder="账号绑定的邮箱" />-->
      <!--          </nz-input-group>-->
      <!--        </nz-form-control>-->
      <!--      </nz-form-item>-->
      <!--      <nz-form-item [hidden]="!notifyType.includes('sms')">-->
      <!--        <nz-form-control>-->
      <!--          <nz-input-group nzSize="large" nzPrefixIcon="mobile">-->
      <!--            <input nz-input type="text" formControlName="mobile" placeholder="账号绑定的手机号" />-->
      <!--          </nz-input-group>-->
      <!--        </nz-form-control>-->
      <!--      </nz-form-item>-->
      <nz-form-item>
        <nz-form-control [nzErrorTip]="'ic.action.enter.captcha' | i18n">
          <nz-input-group nzSize="large" nzPrefixIcon="code">
            <input
              autocomplete="new-password"
              nz-input
              formControlName="verificationCode"
              [placeholder]="'ic.action.enter.captcha' | i18n"
            />
          </nz-input-group>
        </nz-form-control>
      </nz-form-item>
      <nz-form-item>
        <nz-form-control [nzErrorTip]="'validation.password.strength.msg' | i18n">
          <nz-input-group nzSize="large" nzPrefixIcon="lock">
            <input
              nz-input
              autocomplete="new-password"
              type="text"
              formControlName="password"
              [placeholder]="'validation.password.required' | i18n"
            />
          </nz-input-group>
          <!--          <ng-template #suffixTemplate1>-->
          <!--            <span nz-icon *ngIf="passwordVisible1" [nzType]="'eye-invisible'" (click)="passwordVisible1 = !passwordVisible1"></span>-->
          <!--            <span nz-icon *ngIf="!passwordVisible1" [nzType]="'eye'" (click)="passwordVisible1 = !passwordVisible1"></span>-->
          <!--          </ng-template>-->
        </nz-form-control>
      </nz-form-item>
      <nz-form-item>
        <nz-form-control [nzErrorTip]="'validation.password.twice' | i18n">
          <nz-input-group nzSize="large" nzPrefixIcon="lock">
            <input
              nz-input
              autocomplete="new-password"
              type="text"
              formControlName="newPassword"
              [placeholder]="'validation.confirm-password.required' | i18n"
            />
          </nz-input-group>
          <!--          <ng-template #suffixTemplate2>-->
          <!--            <span nz-icon *ngIf="passwordVisible2" [nzType]="'eye-invisible'" (click)="passwordVisible2 = !passwordVisible2"></span>-->
          <!--            <span nz-icon *ngIf="!passwordVisible2" [nzType]="'eye'" (click)="passwordVisible2 = !passwordVisible2"></span>-->
          <!--          </ng-template>-->
        </nz-form-control>
      </nz-form-item>
    </nz-tab>
  </nz-tabset>
  <nz-form-item>
    <button nz-button type="submit" nzType="primary" nzSize="large" [nzLoading]="loading" [disabled]="!form.valid" nzBlock>
      {{ 'ic.actions.submit' | i18n }}
    </button>
  </nz-form-item>
  <nz-form-item nz-row nzJustify="end">
    <nz-col [nzSpan]="12" class="text-right login-register-button-wrapper">
      <ng-container>
        <a class="forgot login-forget-button" (click)="returnLogin()">{{ 'ic.actions.back' | i18n }}</a>
      </ng-container>
    </nz-col>
  </nz-form-item>
</form>
