<bit-dialog>
  <span bitDialogTitle>
    {{ "takeover" | i18n }}
    <small class="tw-text-muted" *ngIf="dialogData.grantorName">{{ dialogData.grantorName }}</small>
  </span>

  <div bitDialogContent>
    @if (initializing) {
      <div class="tw-flex tw-items-center tw-justify-center">
        <bit-icon
          name="bwi-spinner"
          class="bwi-spin bwi-2x tw-text-muted"
          [ariaLabel]="'loading' | i18n"
        ></bit-icon>
      </div>
    } @else {
      <!-- TODO: PM-22237 -->
      <!-- <bit-callout type="warning">{{
        "emergencyAccessLoggedOutWarning" | i18n: dialogData.grantorName
      }}</bit-callout> -->

      <auth-input-password
        [flow]="inputPasswordFlow"
        [masterPasswordPolicyOptions]="masterPasswordPolicyOptions"
        (onPasswordFormSubmit)="handlePasswordFormSubmit($event)"
        (isSubmitting)="handleIsSubmittingChange($event)"
      ></auth-input-password>
    }
  </div>

  <ng-container bitDialogFooter>
    <button
      type="button"
      bitButton
      buttonType="primary"
      [disabled]="submitting$ | async"
      (click)="handlePrimaryButtonClick()"
    >
      {{ "save" | i18n }}
    </button>
    <button type="button" bitButton buttonType="secondary" bitDialogClose>
      {{ "cancel" | i18n }}
    </button>
  </ng-container>
</bit-dialog>
