{% if channels|length > 1 %}
<div class="ui simple dropdown item channel-selector">
<span class="channel-icon">🌐</span>
<i class="dropdown icon"></i>
<div class="menu">
{% for channel in channels|filter(channel => channel.hostname is not empty) %}
<a href="{{ (app.request.secure ? 'https://' : 'http://') ~ channel.hostname }}" target="_blank" class="item">
{% include '@SyliusAdmin/Common/_channel.html.twig' %}
</a>
{% endfor %}
</div>
</div>
{% elseif channels|length == 1 %}
{% set channel = channels|first %}
{% if channel.hostname is not empty %}
<a href="{{ (app.request.secure ? 'https://' : 'http://') ~ channel.hostname }}" target="_blank" class="item channel-selector">
<span class="channel-icon">🌐</span>
</a>
{% endif %}
{% endif %}