@if (initializing) {
  <div class="tw-flex tw-items-center tw-justify-center">
    <bit-icon name="bwi-spinner" class="bwi-spin bwi-3x" [ariaLabel]="'loading' | i18n"></bit-icon>
  </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>
  }
}
