<commit_before><page-layout [ready]="data$ | async" [ngSwitch]="step$ | async">
  <page-content *ngSwitchCase="'form'" [heading]="title"
    [mode]="(layout.ltsm$ | async) ? 'fullHeight' : 'normal'" last>
    <div class="flex-grow-1">
      <payment-step-form [data]="data" [form]="form"
        [currency]="currency$ | async" [paymentTypeData$]="paymentTypeData$"
        (availablePaymentTypes)="availablePaymentTypes = $event"
        [customValuesControlGetter]="customValuesControlGetter">
      </payment-step-form>
    </div>
    <actions ngClass="mt-3" forceRow>
      <button class="btn btn-primary" [disabled]="requesting$ | async"
        (click)="toConfirm()">{{ messages.general.next }}</button>
    </actions>
  </page-content>

  <page-content *ngSwitchCase="'confirm'"
    [heading]="messages.transaction.title.paymentConfirmation"
    [mode]="(layout.ltsm$ | async) ? 'fullHeight' : 'normal'" last>
    <div class="flex-grow-1 d-flex flex-column" [ngSwitch]="step$ | async">
      <payment-step-confirm [preview]="preview"
        [confirmationPassword]="<PASSWORD>"
        (confirmationModeChanged)="confirmationMode$.next($event)"
        (confirmedWithDevice)="perform($event)"
        [showPaymentType]="(availablePaymentTypes || []).length > 1">
      </payment-step-confirm>
    </div>
    <actions ngClass="mt-3" forceRow>
      <button
        *ngIf="(confirmationMode$ | async) != ConfirmationMode.Device; else spacer"
        class="btn btn-primary"
        [disabled]="!canConfirm || (requesting$ | async)" (click)="perform()">
        {{ messages.general.confirm }}
      </button>
      <ng-template #spacer>&nbsp;</ng-template>
      <button class="btn btn-outline-primary" (click)="backToForm()">
        {{ messages.general.previous }}
      </button>
    </actions>
  </page-content>

  <page-content *ngSwitchCase="'done'" [heading]="doneTitle"
    [mode]="(layout.ltsm$ | async) ? 'fullHeight' : 'normal'" last>
    <div class="flex-grow-1 d-flex flex-column" [ngSwitch]="step$ | async">
      <payment-step-done [performed]="performed"></payment-step-done>
    </div>
    <actions ngClass="mt-3" forceRow>
      <button class="btn btn-primary" (click)="viewPerformed()">
        {{ messages.transaction.doneView }}
      </button>
      <button class="btn btn-outline-primary" (click)="reload()"><commit_msg>Don't show the back arrow on inner payment steps<commit_after><page-layout [ready]="data$ | async" [ngSwitch]="step$ | async">
  <page-content *ngSwitchCase="'form'" [heading]="title"
    [mode]="(layout.ltsm$ | async) ? 'fullHeight' : 'normal'" last>
    <div class="flex-grow-1">
      <payment-step-form [data]="data" [form]="form"
        [currency]="currency$ | async" [paymentTypeData$]="paymentTypeData$"
        (availablePaymentTypes)="availablePaymentTypes = $event"
        [customValuesControlGetter]="customValuesControlGetter">
      </payment-step-form>
    </div>
    <actions ngClass="mt-3" forceRow>
      <button class="btn btn-primary" [disabled]="requesting$ | async"
        (click)="toConfirm()">{{ messages.general.next }}</button>
    </actions>
  </page-content>

  <page-content *ngSwitchCase="'confirm'" hideBack
    [heading]="messages.transaction.title.paymentConfirmation"
    [mode]="(layout.ltsm$ | async) ? 'fullHeight' : 'normal'" last>
    <div class="flex-grow-1 d-flex flex-column" [ngSwitch]="step$ | async">
      <payment-step-confirm [preview]="preview"
        [confirmationPassword]="<PASSWORD>"
        (confirmationModeChanged)="confirmationMode$.next($event)"
        (confirmedWithDevice)="perform($event)"
        [showPaymentType]="(availablePaymentTypes || []).length > 1">
      </payment-step-confirm>
    </div>
    <actions ngClass="mt-3" forceRow>
      <button
        *ngIf="(confirmationMode$ | async) != ConfirmationMode.Device; else spacer"
        class="btn btn-primary"
        [disabled]="!canConfirm || (requesting$ | async)" (click)="perform()">
        {{ messages.general.confirm }}
      </button>
      <ng-template #spacer>&nbsp;</ng-template>
      <button class="btn btn-outline-primary" (click)="backToForm()">
        {{ messages.general.previous }}
      </button>
    </actions>
  </page-content>

  <page-content *ngSwitchCase="'done'" hideBack [heading]="doneTitle"
    [mode]="(layout.ltsm$ | async) ? 'fullHeight' : 'normal'" last>
    <div class="flex-grow-1 d-flex flex-column" [ngSwitch]="step$ | async">
      <payment-step-done [performed]="performed"></payment-step-done>
    </div>
    <actions ngClass="mt-3" forceRow>
      <button class="btn btn-primary" (click)="viewPerformed()">
        {{ messages.transaction.doneView }}
      </button>
      <button class="btn btn-outline-primary" (click)="reload()">
{'fraction_non_alphanumeric': 0.18904109589041096, 'fraction_numerical': 0.0029504741833508955, 'mean_word_length': 3.818274111675127, 'pattern_counts': {'":': 0, '<': 73, '<?xml version=': 0, '>': 75, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3397755', 'n_tokens_mistral': 1510, 'n_tokens_neox': 1487, 'n_words': 249}