"use strict";const generateBadgeContent=(n,t)=>`
    {% assign content = ${t?JSON.stringify(n):n} %}

    {%if content.size > 0 %}
      {% if variant.compare_at_price and variant.compare_at_price > 0 %}
        {% assign amountDiscount = variant.compare_at_price | minus: variant.price %}
        {% assign percentDiscount = amountDiscount | times: 100.0 | divided_by: variant.compare_at_price | round%}
      {% else %}
        {% assign amountDiscount = 0 %}
        {% assign percentDiscount = 0 %}
      {% endif %}

      {% assign percentDiscountValue = percentDiscount | append: "%" %}
      {% assign amountDiscountValue = amountDiscount | money_without_trailing_zeros %}
      {% assign price = variant.price | divided_by: 100 %}
      {% assign minPriceValue = product.variants | map: "price" | sort | first | money_without_trailing_zeros %}
      {% assign inventoryQuantityValue = variant.inventory_quantity | default: 0 %}

      {% assign percentDiscountKey = "{percent_discount}" %}
      {% assign amountDiscountKey = "{amount_discount}" %}
      {% assign minPriceKey = "{min_price}" %}
      {% assign inventoryQuantityKey = "{inventory_quantity}" %}
    {% endif %}
  `;exports.generateBadgeContent=generateBadgeContent;
