<commit_before>extends ../../../components/layout/templates/scaffold

block body
  if saleArtwork.get('reserve_status') == 'reserve_not_met'
    - message = 'Reserve not met.'
    include ../../../components/alert/template

  #feature-bid-page-container.mobile-app-top-padding
    h1.feature-bid-page-h1 Confirm your bid

    #feature-bid-page-detail
      img( src=artwork.defaultImageUrl() )
      h2
        .feature-bid-page-lot-num Lot #{saleArtwork.get('lot_label')}
        if artwork.get('artist')
          = artwork.get('artist').name
          br
        em= artwork.get('title')

    include ../../../components/bid_numbers/template

    if registered && !qualified
      a#feature-bid-page-register-button.avant-garde-box-button.is-disabled(
        disabled=true
      ) Registration Pending
      #feature-bid-page-register-button-info
        | Reviewing Submitted Information

    else if !registered
      if auction.isRegistrationEnded()
        a#feature-bid-page-register-button.avant-garde-box-button.is-disabled(
          disabled=true
        ) Registration Closed

      else if !hasQualifiedCreditCard
        a#feature-bid-page-register-button.avant-garde-box-button(
          href=registerUrl
        ) Register to bid

    .feature-bid-page-max-bid
      unless ((registered && qualified) || hasQualifiedCreditCard)
        .feature-bid-page-max-bid-overlay
      .feature-bid-page-max-bid-headers
        h2 Set your max bid
        h3
          | Set the maximum amount you would like Artsy to bid up to on your behalf

      form
        input( type='hidden', name='artwork_id', value=artwork.get('id') )
        input( type='hidden', name='sale_id', value=auction.get('id') )
        select.bordered-select.feature-bid-page-max-bid-select( name='bid' )
          - incrementsInCents = bidIncrements.filter(function(i) { return i > (myLastMaxBid || 0) })
          for incrementCent in incrementsInCents
            - incrementDollar = incrementCent / 100
            - formattedIncrementDollar = accounting.formatMoney(incrementDollar, saleArtwork.get('symbol'), 0)
            option(
              value=incrementCent
              data-display=formattedIncrementDollar
              selected=(maxBid === incrementDollar)
            )= formattedIncrementDollar
        - next = incrementsInCents[0]
        #feature-bid-page-errors
          if error
            = error.message
        if registered || hasQualifiedCreditCard
          if registered
            include ../../../../desktop/apps/auction_support/templates/conditions-of-sale-message.jade
            button.avant-garde-box-button.avant-garde-box-button-black.feature-bid-page-button
              | Bid #{accounting.formatMoney(maxBid, saleArtwork.get('symbol'), 0)}
              .loading-spinner
          else
            include ../../../../desktop/apps/auction_support/templates/conditions-of-sale-checkbox.jade
            button.avant-garde-box-button.avant-garde-box-button-black.feature-bid-page-button.is-disabled
              | Bid #{accounting.formatMoney(maxBid, saleArtwork.get('symbol'), 0)}
              .loading-spinner
    #feature-clock-container.js-auction-clock
      include ../../../../desktop/components/clock/template<commit_msg>Display the minimumNextBid in dollars if there isn’t a max bid.<commit_after>extends ../../../components/layout/templates/scaffold

block body
  if saleArtwork.get('reserve_status') == 'reserve_not_met'
    - message = 'Reserve not met.'
    include ../../../components/alert/template

  #feature-bid-page-container.mobile-app-top-padding
    h1.feature-bid-page-h1 Confirm your bid

    #feature-bid-page-detail
      img( src=artwork.defaultImageUrl() )
      h2
        .feature-bid-page-lot-num Lot #{saleArtwork.get('lot_label')}
        if artwork.get('artist')
          = artwork.get('artist').name
          br
        em= artwork.get('title')

    include ../../../components/bid_numbers/template

    if registered && !qualified
      a#feature-bid-page-register-button.avant-garde-box-button.is-disabled(
        disabled=true
      ) Registration Pending
      #feature-bid-page-register-button-info
        | Reviewing Submitted Information

    else if !registered
      if auction.isRegistrationEnded()
        a#feature-bid-page-register-button.avant-garde-box-button.is-disabled(
          disabled=true
        ) Registration Closed

      else if !hasQualifiedCreditCard
        a#feature-bid-page-register-button.avant-garde-box-button(
          href=registerUrl
        ) Register to bid

    .feature-bid-page-max-bid
      unless ((registered && qualified) || hasQualifiedCreditCard)
        .feature-bid-page-max-bid-overlay
      .feature-bid-page-max-bid-headers
        h2 Set your max bid
        h3
          | Set the maximum amount you would like Artsy to bid up to on your behalf

      form
        input( type='hidden', name='artwork_id', value=artwork.get('id') )
        input( type='hidden', name='sale_id', value=auction.get('id') )
        select.bordered-select.feature-bid-page-max-bid-select( name='bid' )
          - incrementsInCents = bidIncrements.filter(function(i) { return i > (myLastMaxBid || 0) })
          - minimumNextBidDollars = incrementsInCents[0] / 100
          - bidButtonValue = maxBid || minimumNextBidDollars
          for incrementCent in incrementsInCents
            - incrementDollar = incrementCent / 100
            - formattedIncrementDollar = accounting.formatMoney(incrementDollar, saleArtwork.get('symbol'), 0)
            option(
              value=incrementCent
              data-display=formattedIncrementDollar
              selected=(maxBid === incrementDollar)
            )= formattedIncrementDollar
        #feature-bid-page-errors
          if error
            = error.message
        if registered || hasQualifiedCreditCard
          if registered
            include ../../../../desktop/apps/auction_support/templates/conditions-of-sale-message.jade
            button.avant-garde-box-button.avant-garde-box-button-black.feature-bid-page-button
              | Bid #{accounting.formatMoney(bidButtonValue, saleArtwork.get('symbol'), 0)}
              .loading-spinner
          else
            include ../../../../desktop/apps/auction_support/templates/conditions-of-sale-checkbox.jade
            button.avant-garde-box-button.avant-garde-box-button-black.feature-bid-page-button.is-disabled
              | Bid #{accounting.formatMoney(bidButtonValue, saleArtwork.get('symbol'), 0)}
              .loading-spinner
    #feature-clock-container.js-auction-clock
      include ../../../../desktop/components/clock/template
{'fraction_non_alphanumeric': 0.12215227817745804, 'fraction_numerical': 0.00434652278177458, 'mean_word_length': 2.3298403193612773, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6030750', 'n_tokens_mistral': 1989, 'n_tokens_neox': 1889, 'n_words': 321}