{% macro fromCountryCode(country_code) %}
    <i class="{{ country_code|lower }} flag"></i>
{% endmacro %}

{% macro fromLocaleCode(locale_code) %}
    {% import _self as flags %}

    {% set country_code = locale_code|sylius_locale_country %}

    {% if country_code %}
        {{ flags.fromCountryCode(country_code) }}
    {% endif %}
{% endmacro %}
