{% set currentLanguage = app.request.locale %}
{#<style>#}
{# .shadow-1 {#}
{# box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);#}
{# }#}
{# .shadow-2 {#}
{# box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);#}
{# }#}
{# .shadow-3 {#}
{# box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);#}
{# }#}
{# .shadow-4 {#}
{# box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);#}
{# }#}
{# .shadow-5 {#}
{# box-shadow: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22);#}
{# }#}
{# .language-dropdown {#}
{# display: inline-block;#}
{# margin: 5px 5px;#}
{# position: relative; /* Agregamos posición relativa para que el menú desplegable se posicione en relación a este elemento */#}
{# }#}
{# .language-dropdown .lang-en {#}
{# border-left: 4px solid #E2162C;#}
{# }#}
{# .language-dropdown .lang-en .flag {#}
{# background-image: url("https://icons.iconarchive.com/icons/twitter/twemoji-flags/48/United-Kingdom-Flag-icon.png");#}
{# }#}
{# .language-dropdown .lang-es {#}
{# border-left: 4px solid #106eea;#}
{# }#}
{# .language-dropdown .lang-es .flag {#}
{# background-image: url("https://icons.iconarchive.com/icons/wikipedia/flags/48/ES-Spain-Flag-icon.png");#}
{# }#}
{# .language-dropdown label,#}
{# .language-dropdown ul li {#}
{# display: block;#}
{# width: 50px;#}
{# height: 38px;#}
{# background: #fff;#}
{# padding: 0px 6px;#}
{# cursor: pointer;#}
{# }#}
{# .language-dropdown ul.lang-list {#}
{# position: absolute; /* Cambiamos la posición a absoluta para que el menú desplegable aparezca por encima de otros elementos */#}
{# display: none;#}
{# z-index: 10; /* Establecemos un z-index alto para asegurarnos de que el menú desplegable esté en la parte superior */#}
{# }#}
{# .language-dropdown ul.lang-list li {#}
{# border-bottom: 1px solid #ECECEC;#}
{# }#}
{# .language-dropdown ul.lang-list li:last-child {#}
{# border-bottom-right-radius: 2px;#}
{# border-bottom-left-radius: 2px;#}
{# }#}
{# .language-dropdown ul.lang-list li.selected {#}
{# display: none;#}
{# }#}
{# .language-dropdown label {#}
{# position: relative;#}
{# border-bottom: 1px solid #ECECEC;#}
{# border-radius: 3px;#}
{# z-index: 2;#}
{# }#}
{# .language-dropdown .lang-flag .flag,#}
{# .language-dropdown .lang-list .lang .flag {#}
{# float: left;#}
{# width: 100%;#}
{# height: 100%;#}
{# cursor: pointer;#}
{# background-size: 35px 35px;#}
{# background-repeat: no-repeat;#}
{# background-position: center;#}
{# }#}
{# .language-dropdown.open ul.lang-list {#}
{# display: block;#}
{# }#}
{# .language-dropdown.open label {#}
{# border-bottom-left-radius: 0px;#}
{# border-bottom-right-radius: 0px;#}
{# }#}
{# .animate {#}
{# cursor: pointer;#}
{# transition: all .5s;#}
{# backface-visibility: hidden;#}
{# }#}
{# .language-dropdown .lang-flag,#}
{# .language-dropdown .lang-list {#}
{# transition: all .5s;#}
{# backface-visibility: hidden;#}
{# }#}
{#</style>#}
<div class="setting-link iconset pe-0">
{% if currentLanguage == 'es' %}
<a href="{{ pimcore_document(1) ~ 'en'}}">
<img class="lang-image" src="{{ asset('assets/images/icons8-great-britain-48.png') }}" alt=""/></a>
<span class="tooltip-label">English</span>
{% elseif currentLanguage == 'en' %}
<a href="{{ pimcore_document(1) ~ 'es'}}">
<img class="lang-image" src="{{ asset('assets/images/icons8-spain-48.png') }}" alt=""/></a>
<span class="tooltip-label">Español</span>
{% endif %}
</div>
{#<div id="settingsBox">#}
{# <div class="language-picker">#}
{# <span class="ttl">{{ "SELECT LANGUAGE" | trans | upper }}</span>#}
{# <ul id="language" class="cnrLangList">#}
{# <li><a href="{{ pimcore_document(1) ~ 'es' }}" class="{{ currentLanguage == 'es' ? 'active':'' }}">Español</a></li>#}
{# <li><a href="{{ pimcore_document(1) ~ 'en' }}" class="{{ currentLanguage == 'en' ? 'active':'' }}" >English</a></li>#}
{# </ul>#}
{# </div>#}
{#</div>#}
{#<div id="lang_selector" class="language-dropdown">#}
{# <label for="toggle" class="lang-flag lang-{{currentLanguage}}" title="Click to select the language">#}
{# <span class="flag"></span>#}
{# </label>#}
{# <ul class="lang-list">#}
{# <li class="lang lang-es" title="ES">#}
{# <span class="flag"></span>#}
{# </li>#}
{# <li class="lang lang-en" title="EN">#}
{# <span class="flag"></span>#}
{# </li>#}
{# </ul>#}
{#</div>#}
{#<script>#}
{# $(document).ready(function(){#}
{# $(".lang-flag").click(function(){#}
{# $(".language-dropdown").toggleClass("open");#}
{# });#}
{# $("ul.lang-list li").click(function(){#}
{# var selectedLang = 'en';#}
{# if($(this).hasClass('lang-es')){#}
{# selectedLang = 'es';#}
{# }#}
{# window.location.href = "/" + selectedLang;#}
{# });#}
{# })#}
{#</script>#}