{%- comment -%}
----------------------------------------------------------------------------------------------------------------------
PRODUCT PRICE
----------------------------------------------------------------------------------------------------------------------
Render a list of price for a product, variant or line item.
********************************************
Supported variables
********************************************
* product: if provided, the prices are rendered for the whole product
* variant: if provided, then only the price from this variant is rendered
* line_item: if provided, then the price from this line item are rendered (used on cart or order)
* hide_unit_price: if set to true unit prices are hidden (mostly useful for size constrained elements)
* context: can be "product", "line_item" or "card". This controls how the prices are displayed (using the correct sizes)
* form_id: if specified, the prices are updated dynamically based on the form update
{%- endcomment -%}
{%- liquid
case context
when 'card' or 'line_item'
assign base_text_class = ''
if settings.product_card_text_font == 'heading'
assign base_text_class = 'h6 '
endif
assign regular_price_classes = base_text_class | append: 'text-subdued'
assign on_sale_price_classes = base_text_class | append: 'text-on-sale'
assign compare_at_price_classes = base_text_class | append: 'text-subdued line-through'
assign unit_price_classes = base_text_class | append: 'text-subdued'
when 'product'
assign regular_price_classes = base_text_class | append: 'h4 text-subdued'
assign on_sale_price_classes = base_text_class | append: 'h4 text-on-sale'
assign compare_at_price_classes = base_text_class | append: 'h5 text-subdued line-through'
assign unit_price_classes = base_text_class | append: 'h6 text-subdued'
endcase
-%}