{% sw_extends '@Storefront/storefront/layout/header/account-menu.html.twig' %}
{% block utilities_offcanvas_content %}
<div class="account-menu">
{% block layout_header_actions_account_widget_dropdown_header %}
{% if not context.customer.guest %}
<div class="dropdown-header account-menu-header">
{{ "account.myAccount"|trans|sw_sanitize }}
</div>
{% endif %}
{% endblock %}
{% block layout_header_actions_account_widget_dropdown_login %}
{% if context.customer %}
{# TODO Not sure why there are two logout buttons in the menu,
one here and one in page/account/sidebar.html.twig #}
{# <wyn-button#}
{# variant="primary"#}
{# size="small"#}
{# href="{{ path('frontend.account.logout.page') }}"#}
{# {% if context.customer.guest %}#}
{# data-account-guest-abort-button="true"#}
{# {% endif %}#}
{# class="account-logout-button"#}
{# >#}
{# {% sw_icon 'log-out' style { 'slotAttr': 'icon' } %}#}
{# {% if context.customer.guest %}#}
{# {{ "account.guestAbort"|trans|sw_sanitize }}#}
{# {% else %}#}
{# {{ "account.logout"|trans|sw_sanitize }}#}
{# {% endif %}#}
{# </wyn-button>#}
{% else %}
<wyn-button
variant="primary"
href="{{ path('frontend.account.login.page') }}"
title="{{ "account.loginSubmit"|trans|striptags }}"
class="account-menu-login-button"
>
{{ "account.loginSubmit"|trans|sw_sanitize }}
</wyn-button>
<wyn-button
variant="secondary"
href="{{ path('frontend.account.login.page') }}"
title="{{ "account.orRegisterLink"|trans|striptags }}"
class="account-menu-register-button"
>
{{ "account.orRegisterLink"|trans|striptags }}
</wyn-button>
{% endif %}
{% endblock %}
{% block layout_header_actions_account_widget_dropdown_links %}
<div class="account-menu-links">
{% sw_include '@Storefront/storefront/page/account/sidebar.html.twig' with {'headerWidget': true} %}
</div>
{% endblock %}
</div>
{% endblock %}