<commit_before><ActionCardContainer
  @header="Prepaid Card Choice"
  @isComplete={{@isComplete}}
  data-test-prepaid-card-choice-is-complete={{@isComplete}}
>
  <ActionCardContainer::Section @title="Choose a prepaid card to fund merchant creation">
    <CardPay::LabeledValue @label="Merchant Name" class="prepaid-card-choice__field-label">
      <CardPay::Merchant
        @name={{@name}}
        @size="small"
        @logoBackground={{@logoBackground}}
        @logoTextColor={{@logoTextColor}}
      />
    </CardPay::LabeledValue>
    <CardPay::LabeledValue @label="Merchant ID" class="prepaid-card-choice__field-label">
      {{@id}}
    </CardPay::LabeledValue>
    <CardPay::LabeledValue @label="Merchant Creation Fee" class="prepaid-card-choice__field-label">
      <CardPay::BalanceDisplay
        class="prepaid-card-choice__cost"
        @icon="spend"
        @sign="§"
        @symbol="SPEND"
        @balance={{this.merchantRegistrationFee}}
        @usdBalance={{spend-to-usd this.merchantRegistrationFee}}
        data-test-prepaid-card-choice-merchant-fee
      />
    </CardPay::LabeledValue>
    <CardPay::LabeledValue @label="Pay Using Prepaid Card" class="prepaid-card-choice__field-label">
      {{!-- TODO: card picker --}}
    </CardPay::LabeledValue>
    {{#if @isComplete}}
      <CardPay::LabeledValue @label="Merchant Address" class="prepaid-card-choice__field-label">
        <CardPay::Merchant
          @name={{@name}}
          @address={{@workflowSession.state.merchantSafe.address}}
          @size="small"
          @logoBackground={{@logoBackground}}
          @logoTextColor={{@logoTextColor}}
          data-test-prepaid-card-choice-merchant-address
        />
      </CardPay::LabeledValue>
    {{/if}}
    {{#if this.error}}
      <CardPay::ErrorMessage data-test-prepaid-card-choice-error-message as |supportURL|>
        {{#if (eq this.error.message "INSUFFICIENT_FUNDS")}}
          {{!-- TODO: This should be accompanied by canceling the workflow CS-1620 --}}
          TODO insufficient funds message
        {{else if (eq this.error.message "TIMEOUT")}}
          There was a problem creating your merchant. Please contact <a href={{supportURL}} target="_blank" rel="noopener noreferrer">Cardstack support</a> to find out the status of your transaction.
        {{else if (eq this.error.message "USER_REJECTION")}}
          It looks like you have canceled the request in your wallet. Please try again if you want to continue with this workflow.
        {{else}}
          There was a problem creating your merchant. This may be due to a network issue, or perhaps you canceled the request in your wallet. Please try again if you want to continue with this workflow, or contact <a href={{supportURL}} target="_blank" rel="noopener noreferrer">Cardstack support</a>.<commit_msg>update prepaid card choice with customizations from workflow session<commit_after><ActionCardContainer
  @header="Prepaid Card Choice"
  @isComplete={{@isComplete}}
  data-test-prepaid-card-choice-is-complete={{@isComplete}}
>
  <ActionCardContainer::Section @title="Choose a prepaid card to fund merchant creation">
    <CardPay::LabeledValue @label="Merchant Name" class="prepaid-card-choice__field-label">
      <CardPay::Merchant
        @name={{@workflowSession.state.merchantName}}
        @size="small"
        @logoBackground={{@workflowSession.state.merchantBgColor}}
        @logoTextColor={{@workflowSession.state.merchantTextColor}}
      />
    </CardPay::LabeledValue>
    <CardPay::LabeledValue @label="Merchant ID" class="prepaid-card-choice__field-label">
      {{@workflowSession.state.merchantId}}
    </CardPay::LabeledValue>
    <CardPay::LabeledValue @label="Merchant Creation Fee" class="prepaid-card-choice__field-label">
      <CardPay::BalanceDisplay
        class="prepaid-card-choice__cost"
        @icon="spend"
        @sign="§"
        @symbol="SPEND"
        @balance={{this.merchantRegistrationFee}}
        @usdBalance={{spend-to-usd this.merchantRegistrationFee}}
        data-test-prepaid-card-choice-merchant-fee
      />
    </CardPay::LabeledValue>
    <CardPay::LabeledValue @label="Pay Using Prepaid Card" class="prepaid-card-choice__field-label">
      {{!-- TODO: card picker --}}
    </CardPay::LabeledValue>
    {{#if @isComplete}}
      <CardPay::LabeledValue @label="Merchant Address" class="prepaid-card-choice__field-label">
        <CardPay::Merchant
          @name={{@workflowSession.state.merchantName}}
          @address={{@workflowSession.state.merchantSafe.address}}
          @size="small"
          @logoBackground={{@workflowSession.state.merchantBgColor}}
          @logoTextColor={{@workflowSession.state.merchantTextColor}}
          data-test-prepaid-card-choice-merchant-address
        />
      </CardPay::LabeledValue>
    {{/if}}
    {{#if this.error}}
      <CardPay::ErrorMessage data-test-prepaid-card-choice-error-message as |supportURL|>
        {{#if (eq this.error.message "INSUFFICIENT_FUNDS")}}
          {{!-- TODO: This should be accompanied by canceling the workflow CS-1620 --}}
          TODO insufficient funds message
        {{else if (eq this.error.message "TIMEOUT")}}
          There was a problem creating your merchant. Please contact <a href={{supportURL}} target="_blank" rel="noopener noreferrer">Cardstack support</a> to find out the status of your transaction.
        {{else if (eq this.error.message "USER_REJECTION")}}
          It looks like you have canceled the request in your wallet. Please try again if you want to continue with this workflow.
        {{else}}
          There was a problem creating your merchant. This may be due to a network issue, or perhaps you canceled the request in your wallet. Please try again if you want to continue with this workflow, or contact <a href={{supportURL}} target="_blank" rel="noopener noreferrer">Cardstack support</a>.
{'fraction_non_alphanumeric': 0.13245033112582782, 'fraction_numerical': 0.001358464934623875, 'mean_word_length': 3.5552977571539057, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 43, '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': '6546423', 'n_tokens_mistral': 1706, 'n_tokens_neox': 1708, 'n_words': 395}