{%- doc -%}
  Renders tax and shipping information text based on the cart's tax and duties state.
  Intended for use in a block similar to the text block.

  @param {boolean} [has_discounts_enabled] - Whether discounts are enabled, used to display alternate tax/duty text.
{%- enddoc -%}

<small>
  {%- if cart.duties_included and cart.taxes_included -%}
    {%- if shop.shipping_policy.body == blank -%}
      {%- if has_discounts_enabled -%}
        {{ 'content.duties_and_taxes_included_shipping_at_checkout_without_policy_without_discounts' | t }}
      {%- else -%}
        {{ 'content.duties_and_taxes_included_shipping_at_checkout_without_policy' | t }}
      {%- endif -%}
    {%- else -%}
      {%- if has_discounts_enabled -%}
        {{
          'content.duties_and_taxes_included_shipping_at_checkout_with_policy_without_discounts_html'
          | t: link: shop.shipping_policy.url
        }}
      {%- else -%}
        {{
          'content.duties_and_taxes_included_shipping_at_checkout_with_policy_html'
          | t: link: shop.shipping_policy.url
        }}
      {%- endif -%}
    {%- endif -%}
  {%- elsif cart.duties_included == false and cart.taxes_included -%}
    {%- if shop.shipping_policy.body == blank -%}
      {%- if has_discounts_enabled -%}
        {{ 'content.duties_and_taxes_included_shipping_at_checkout_without_policy_without_discounts' | t }}
      {%- else -%}
        {{ 'content.taxes_included_shipping_at_checkout_without_policy' | t }}
      {%- endif -%}
    {%- else -%}
      {%- if has_discounts_enabled -%}
        {{
          'content.duties_and_taxes_included_shipping_at_checkout_with_policy_without_discounts_html'
          | t: link: shop.shipping_policy.url
        }}
      {%- else -%}
        {{ 'content.taxes_included_shipping_at_checkout_with_policy_html' | t: link: shop.shipping_policy.url }}
      {%- endif -%}
    {%- endif -%}
  {%- elsif cart.duties_included and cart.taxes_included == false -%}
    {%- if shop.shipping_policy.body == blank -%}
      {%- if has_discounts_enabled -%}
        {{ 'content.duties_included_taxes_at_checkout_shipping_at_checkout_without_policy_without_discounts' | t }}
      {%- else -%}
        {{ 'content.duties_included_taxes_at_checkout_shipping_at_checkout_without_policy' | t }}
      {%- endif -%}
    {%- else -%}
      {%- if has_discounts_enabled -%}
        {{
          'content.duties_included_taxes_at_checkout_shipping_at_checkout_with_policy_without_discounts_html'
          | t: link: shop.shipping_policy.url
        }}
      {%- else -%}
        {{
          'content.duties_included_taxes_at_checkout_shipping_at_checkout_with_policy_html'
          | t: link: shop.shipping_policy.url
        }}
      {%- endif -%}
    {%- endif -%}
  {%- elsif cart.duties_included == false and cart.taxes_included == false -%}
    {%- if shop.shipping_policy.body == blank -%}
      {%- if has_discounts_enabled -%}
        {{ 'content.taxes_at_checkout_shipping_at_checkout_without_policy_without_discounts' | t }}
      {%- else -%}
        {{ 'content.taxes_at_checkout_shipping_at_checkout_without_policy' | t }}
      {%- endif -%}
    {%- else -%}
      {%- if has_discounts_enabled -%}
        {{
          'content.taxes_at_checkout_shipping_at_checkout_with_policy_without_discounts_html'
          | t: link: shop.shipping_policy.url
        }}
      {%- else -%}
        {{ 'content.taxes_at_checkout_shipping_at_checkout_with_policy_html' | t: link: shop.shipping_policy.url }}
      {%- endif -%}
    {%- endif -%}
  {%- endif -%}
</small>
