{% set userEmail = isLogged() ? user.email : '' %}
{% set hideNotifications = false %}
{% if '@tile.expert' in userEmail %}
{% set hideNotifications = true %}
{% endif %}
{% set isRTWidget = useRTWidget() %}
{% set redCircleClass = '' %}
<svg
version="1.1" id="chat-icon" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
width="40" height="30" x="0px" y="0px" viewBox="0 0 41.1 28.8" xml:space="preserve"
{% if userEmail %}data-user-email="{{ userEmail }}"{% endif %}
{% set unreadMessagesNumber = 0 %}
{% if not hideNotifications and unreadAll is defined and unreadAll > 0 %}
{% if unreadAll > 99 %}
{% set unreadMessagesNumber = '99+' %}
{% else %}
{% set unreadMessagesNumber = unreadAll %}
{% endif %}
{% set redCircleClass = ' red-circle' %}
data-new-messages-number="{{ unreadAll }}"
{% endif %}
class="chat-btn{{ redCircleClass }}"
>
<path class="chat-icon-el-0" d="M1.2,15.9c0,2.7,1.7,5.2,4.6,6.9l0,0c0,1.9-0.8,4.1-1.5,4.9c3,0,6.1-1.5,7.6-2.9h1.5c6.7,0,12.2-4,12.2-8.8
s-5.4-8.8-12.2-8.8S1.2,11,1.2,15.9" />
<circle class="chat-icon-el-1" cx="31.3" cy="9.8" r="9.8"/>
<circle class="chat-icon-el-2" id="chat-icon-circle" cx="31.2" cy="9.8" r="8.3" />
<g>
<path class="chat-icon-el-4" d="M7.4,17.4l-0.1,0.9c-0.4,0.1-0.8,0.1-1.1,0.1c-0.9,0-1.6-0.3-2.1-0.8s-0.7-1.1-0.7-1.8c0-0.7,0.3-1.4,0.8-2
S5.4,13,6.3,13c0.3,0,0.6,0,0.9,0.1l-0.2,1c-0.3-0.1-0.6-0.2-0.9-0.2c-0.5,0-0.9,0.2-1.2,0.5c-0.3,0.3-0.4,0.8-0.4,1.2
c0,0.5,0.2,0.9,0.5,1.3c0.3,0.4,0.8,0.6,1.3,0.6C6.6,17.6,7,17.5,7.4,17.4z" />
<path class="chat-icon-el-4" d="M12.4,18.4h-1.1c0-0.9,0-1.6,0-2.3h-2c0,0.6,0,1.3,0,2.3H8.2c0-0.9,0.1-1.8,0.1-2.7c0-0.9,0-1.8-0.1-2.5h1.1
c0,0.7,0,1.4,0,2.1h2c0-0.6,0-1.3,0-2.1h1.1c0,0.7-0.1,1.5-0.1,2.5S12.3,17.6,12.4,18.4z" />
<path class="chat-icon-el-4" d="M18.1,18.4h-1.3c0-0.2-0.1-0.7-0.4-1.5h-1.8c-0.3,0.8-0.4,1.3-0.4,1.5H13c0-0.1,0.3-1,0.9-2.6
c0.6-1.6,0.9-2.5,0.9-2.6h1.5c0,0.2,0.3,1,0.8,2.6C17.8,17.4,18.1,18.2,18.1,18.4z M16.2,16.1c-0.5-1.4-0.7-2.1-0.7-2.2h-0.1
c0,0.1-0.2,0.8-0.7,2.2H16.2z" />
<path class="chat-icon-el-4" d="M22.1,13.2v0.9c-0.5,0-1-0.1-1.5-0.1c0,0.5,0,1.1,0,1.7c0,1,0,1.9,0,2.7h-1.1c0-0.8,0.1-1.8,0.1-2.7
c0-0.6,0-1.2,0-1.7c-0.4,0-0.9,0-1.5,0.1v-0.9C18.1,13.2,22.1,13.2,22.1,13.2z" />
</g>
<text class="chat-status-off chat-icon-text" transform="translate(25, 13)">off</text>
<text class="chat-status-on chat-icon-text" transform="translate(26, 12)">on</text>
{% set numTextTransformClass = ' single-digit-unread-count' %}
{% if unreadMessagesNumber == '99+' %}
{% set numTextTransformClass = ' multiple-digits-unread-count' %}
{% elseif unreadMessagesNumber > 9 %}
{% set numTextTransformClass = ' double-digits-unread-count' %}
{% endif %}
<text
id="chat-messages-count"
class="chat-icon-text chat-btn-msgs-count{{ numTextTransformClass }}"
textLength="10px"
>
{{ unreadMessagesNumber }}
</text>
</svg>