<div class='bits-purchase pd-t-1 pd-b-1'>
  <div class='tower pd-b-1'>
    <div class='bits-purchase__header col-xs-10'>
      <h4>{{bits-string 'purchase_header'}}</h4>
    </div>
    <div class='col-xs-2'>
      <button class='bits-purchase__close' id='close-bits-purchase' {{action 'close'}}>
        {{partial 'svg/close-small'}}
      </button>
    </div>
    <div class='col-xs-12'>
      <p class='sub-text'>
        {{bits-string 'inventory_footer' '' (hash balance=balance)}}

        {{#if (gt minBits 1)}}
          <br>
          {{bits-string 'inventory_footer_min_bits' '' (hash minBits=minBits channelName=channelName)}}
        {{/if}}
      </p>
    </div>
  </div>
  <div class='scroll'>
    <div class='tse-scroll-content'>
      <div class='tse-content'>
        {{#if (ads-for-bits-enabled channelName)}}
          {{bits/watch-ad-cta}}
        {{/if}}
        {{#each products as |item|}}
          <div class='bits-purchase__row'>
            {{#if item.promo}}
              <div class='bits__amount strong'>
                <div class='bits-twitchcon__title strong'>
                  {{bits-string 'tc_offer_title'}}
                </div>
                {{item.amount}} {{bits-string 'purchase_item' 'Bits'}}
                <span class='bits-twitchcon__amount'>
                  {{bits-string 'tc_offer_details'}}
                </span>
                {{bits/available-emotes amount=item.amount}}
              </div>
              <div class='bits__price'>
                <button class='button bits-buy--button' id={{item.asin}}  {{action 'buy' item.asin item.amount balance}}>
                  {{item.price}}
                </button>
                <div class='bits__discount sub-text'>
                  <div>
                    {{bits-string 'tc_offer_end'}}
                  </div>
                  <div>
                    {{bits-string 'tc_off_limit'}}
                  </div>
                </div>
              </div>
            {{else}}
              <div class='bits__amount strong'>
                {{item.amount}} {{bits-string 'purchase_item' 'Bits'}}
                {{bits/available-emotes amount=item.amount}}
              </div>
              <div class='bits__price'>
                <button class='button bits-buy--button' id={{item.asin}}  {{action 'buy' item.asin item.amount balance}}>
                  {{item.price}}
                </button>
                {{#if item.show}}
                  <div class='bits__discount sub-text'>
                    {{bits-string 'package_discount' '' (hash discount=item.discount)}}
                  </div>
                {{/if}}
              </div>
            {{/if}}
          </div>
        {{/each}}
      </div>
    </div>
  </div>
</div>
