{% comment %}
Properties:
- product: product
- use_variant: boolean
- hide: boolean
- handle_price_range: boolean
- product_tax_rate
{% endcomment %}

{%- liquid
    if use_variant
        assign target = product.selected_or_first_available_variant
    else
        assign target = product
    endif
    
    assign price = target.price

    assign tax_rate = product_tax_rate | times: 0.01
    assign tax_rate_plus = tax_rate | plus:1
    assign product_portion = price | divided_by: tax_rate_plus | round: 2
    assign price = product_portion | money_with_currency
-%}
<span class="price_net {% if hide %} hide{%- endif -%}" data-tax-rate="{{ tax_rate }}" {% render 'overwrite-theme-style', text_color: settings.text_color, font_size: settings.text_font_size %}>
    {{ 'product.net_price' | t: net_price: price }}
</span>