{% sw_extends '@Storefront/storefront/layout/header/header.html.twig' %}
{% block layout_header_actions_cart %}
{% if cio_budgets_show %}
<div class="col-auto">
<div class="header-budget">
<div class="dropdown">
<button class="btn budget-menu-btn header-actions-btn"
type="button"
id="budgetWidget"
data-toggle="dropdown"
aria-expanded="false"
title="{{ 'header.btnMenuTitle' | trans }}">
<span class="icon"><?xml version="1.0" encoding="UTF-8"?>
<svg viewBox="0 0 53 53" xmlns="http://www.w3.org/2000/svg"><path d="m28 14v-7.8c-0.3-4.1-7.2-6.2-14-6.2s-13.6 2.1-14 6.2v37.8c0 4.3 7 6.5 14 6.5 4.3 0 8.6-0.9 11.3-2.5 1.4 3.3 7.6 5 13.7 5 7 0 14-2.2 14-6.5v-15.3c-0.3-4.1-7.2-6.2-14-6.2-4.1 0-8.3 0.8-11 2.3v-5.8zm22 25c0 1.2-3.9 3.5-11 3.5s-11-2.3-11-3.5v-3.3c2.7 1.5 6.9 2.3 11 2.3s8.3-0.8 11-2.3zm-25-25c0 1.2-3.9 3.5-11 3.5s-11-2.3-11-3.5v-3.3c2.7 1.5 6.9 2.3 11 2.3s8.3-0.8 11-2.3zm-11 6.5c4.1 0 8.3-0.8 11-2.3v3.3c0 1.2-3.9 3.5-11 3.5s-11-2.3-11-3.5v-3.3c2.7 1.5 6.9 2.3 11 2.3zm-11 12.7c2.7 1.5 6.9 2.3 11 2.3s8.3-0.8 11-2.3v3.3c0 1.2-3.9 3.5-11 3.5s-11-2.3-11-3.5zm22-4.2c0 1.2-3.9 3.5-11 3.5s-11-2.3-11-3.5v-3.3c2.7 1.5 6.9 2.3 11 2.3s8.3-0.8 11-2.3zm-11-26c7.1 0 11 2.3 11 3.5s-3.9 3.5-11 3.5-11-2.3-11-3.5 3.9-3.5 11-3.5zm0 44.5c-7.1 0-11-2.3-11-3.5v-3.3c2.7 1.5 6.9 2.3 11 2.3s8.3-0.8 11-2.3v3.3c0 1.2-3.9 3.5-11 3.5zm25 2.5c-7.1 0-11-2.3-11-3.5v-3.3c2.7 1.5 6.9 2.3 11 2.3s8.3-0.8 11-2.3v3.3c0 1.2-3.9 3.5-11 3.5zm0-22c7.1 0 11 2.3 11 3.5s-3.9 3.5-11 3.5-11-2.3-11-3.5 3.9-3.5 11-3.5z" fill="currentColor"/>
</svg>
</span>
<span class="d-none d-lg-inline">{{ cio_currently_selected_budget.externalId }} - {{ cio_currently_selected_budget.budget.name|slice(0,10) }} ({{ cio_currently_selected_budget.currentState|number_format(2, ',', '.') }} €)</span>
</button>
<div class="dropdown-menu dropdown-menu-right account-menu-dropdown js-account-menu-dropdown"
aria-labelledby="budgetWidget">
<div class="card">
<div class="list-group list-group-flush">
{% for budget in cio_avaivable_budgets %}
<a class="list-group-item-action account-aside-item" href="{{ url('storefront.account.budgets.select', {
id: budget.budget.id,
redirectTo: cio_avaivable_budgets_redirect,
redirectQuerystring: cio_avaivable_budgets_redirect_querystring,
redirectToParams: cio_avaivable_budgets_redirect_params | json_encode
}) }}">{{ budget.externalId }} - {{ budget.budget.name|slice(0,10) }} ({{ budget.currentState|number_format(2, ',', '.') }} €)</a>
{% endfor %}
</div>
</div>
</div>
</div>
</div>
</div>
{% endif %}
{{ parent() }}
{% endblock %}