<div class="coinList {{ app.request.pathinfo != '/' and app.request.pathinfo != " /buscar/vuelos/" ? 'pointer-events-none' : '' }}">
<div class="dropbtn rounded h-[1.9375rem] p-[0.5rem] !font-[Ubuntu] hover:!bg-[rgba(235,235,235,1)] flex items-center justify-between w-full">
<span>{{ app.session.get('CurrencyFrom') }}</span>
</div>
<div id="myCoinList" class="coinListContent text-center rounded h-auto" data-state="inactive">
{% set isActiveCurrency = app.session.get('isActiveCurrency') %}
{% if 'COP' not in isActiveCurrency %}
<div class="py-1 px-2 !text-[rgba(90, 90, 90, 1)]">
<a class="coin !font-[Ubuntu] rounded !font-normal !p-1 !text-sm hover:!bg-[rgba(235,235,235,1)] hover:!font-bold" data-coin="COP" data-country="co">
COP
</a>
</div>
{% endif %}
{% for currency in isActiveCurrency %}
<div class="py-1 px-2 !text-[rgba(90, 90, 90, 1)]">
<a class="coin !font-[Ubuntu] rounded !font-normal !p-1 !text-sm hover:!bg-[rgba(235,235,235,1)] hover:!font-bold" data-coin="{{ currency }}" data-country="{{ currency|lower|slice(0, 2) }}">{{ currency }}</a>
</div>
{% endfor %}
</div>
</div>
{% set typeCountry = app.session.get('typeCountry') is defined and app.session.get('typeCountry') != '' ? app.session.get('typeCountry') : 'co' %}
{% set typeCoin = app.session.get('typeCoin') is defined and app.session.get('typeCoin') != '' ? app.session.get('typeCoin') : 'COP' %}
<span id="worldpayInfo" class="js-flightHiddenInput" data-selectedcountry="{{ typeCountry }}" data-selectedcoin="{{ typeCoin }}">
{% if app.session.get('domainsecure') == app.request.host %}
{% set coinValue = app.session.get('CoinValue') is defined and app.session.get('typeCoin') != '' ? app.session.get('CoinValue') : 1 %}
{% set rateDiff = app.session.get('RateDiff') is defined ? app.session.get('RateDiff') : 1 %}
<input type="hidden" id="typeCoin" name="typeCoin" readonly data-country="{{ typeCountry }}" value="{{ typeCoin }}">
<input type="hidden" id="CoinValue" name="CoinValue" readonly value="{{ coinValue }}">
<input type="hidden" id="RateDiff" name="RateDiff" readonly value="{{ rateDiff }}">
{% endif %}
</span>
<script>
document.addEventListener('DOMContentLoaded', function() {
let myCoinList = document.getElementById('myCoinList');
if (window.location.pathname !== '/') {
myCoinList.style.pointerEvents = 'none';
}
});
document.addEventListener('DOMContentLoaded', function() {
const coinLinks = document.querySelectorAll('.coin');
const worldpayInfo = document.getElementById('worldpayInfo');
coinLinks.forEach(link => {
link.addEventListener('click', function(event) {
event.preventDefault();
const selectedCoin = this.getAttribute('data-coin');
worldpayInfo.setAttribute('data-selectedcoin', selectedCoin);
});
});
});
</script>