@if (initializing) {
  <div class="tw-flex tw-items-center tw-justify-center">
    <i
      class="bwi bwi-spinner bwi-spin bwi-3x"
      title="{{ 'loading' | i18n }}"
      aria-hidden="true"
    ></i>
  </div>
} @else {
  @if (userType === SetInitialPasswordUserType.OFFBOARDED_TDE_ORG_USER_UNTRUSTED_DEVICE) {
    <div class="tw-mt-4"></div>
    <bit-callout type="warning">
      {{ "loginOnTrustedDeviceOrAskAdminToAssignPassword" | i18n }}
    </bit-callout>
    <button type="button" bitButton block buttonType="secondary" (click)="logout()">
      {{ "logOut" | i18n }}
    </button>
  } @else {
    <bit-callout
      *ngIf="resetPasswordAutoEnroll"
      type="warning"
      title="{{ 'resetPasswordPolicyAutoEnroll' | i18n }}"
    >
      {{ "resetPasswordAutoEnrollInviteWarning" | i18n }}
    </bit-callout>

    <auth-input-password
      [flow]="inputPasswordFlow"
      [email]="email"
      [userId]="userId"
      [loading]="submitting"
      [masterPasswordPolicyOptions]="masterPasswordPolicyOptions"
      [primaryButtonText]="{
        key:
          userType === SetInitialPasswordUserType.OFFBOARDED_TDE_ORG_USER
            ? 'setPassword'
            : 'createAccount',
      }"
      [secondaryButtonText]="{ key: 'logOut' }"
      (onPasswordFormSubmit)="handlePasswordFormSubmit($event)"
      (onSecondaryButtonClick)="logout()"
    ></auth-input-password>
  }
}
