{% from '_layout/input.twig' import input_checkbox_raw %}
{% if is_editing and perms.edit_avatar %}
{{ input_checkbox_raw('avatar[delete]', false, 'profile__header__avatar__check', '', false, {'id':'avatar-delete'}) }}
{% else %}
{% endif %}
{{ profile.username }}
{% if profile.user_title is not empty %}
{{ profile.user_title }}
{% endif %}
{{ profile.user_country|country_name }}
{% if friend_info is defined and (friend_info.subject_relation is not null or friend_info.user_relation is not null) %}
{% if friend_info.subject_relation and friend_info.user_relation %} Mutual Friends {% elseif friend_info.user_relation %} You Follow {% elseif friend_info.subject_relation %} Follows You {% endif %}
{% endif %}
{% if is_editing %} Discard Settings {% elseif can_edit %} Edit Profile {% endif %} {% if current_user is defined and current_user.user_id != profile.user_id and not is_editing %} {% if friend_info.user_relation == constant('MSZ_USER_RELATION_FOLLOW') %} {{ friend_info.subject_relation == constant('MSZ_USER_RELATION_FOLLOW') ? 'Unfriend' : 'Unfollow' }} {% else %} {{ friend_info.subject_relation == constant('MSZ_USER_RELATION_FOLLOW') ? 'Add as Friend' : 'Follow' }} {% endif %} {% endif %}
{% if stats is defined %}
{% for stat in stats %} {% if stat.value|default(false) %} {% set is_date = stat.is_date|default(false) %}
{{ stat.title }}
{% if is_date %} {% else %}
{{ stat.value|number_format }}
{% endif %}
{% endif %} {% endfor %}
{% endif %}