{% sw_extends '@Storefront/storefront/layout/header/actions/account-widget.html.twig' %}
{# ThemeWare® HC-Architecture® via configuration #}
{# ---------------- START: SET TEMPLATE VARS ---------------- #}
{# ThemeWare: Set theme variables #}
{% set twtHeaderAccountBtnCompatibility = theme_config('twt-header-account-btn-compatibility') %}
{% set twtHeaderActionsAccountMenuBtnBadgeShow = theme_config('twt-header-actions-account-menu-btn-badge-show') %}
{% set twtIconSet = theme_config('twt-iconset') %}
{# ---------------- END: SET TEMPLATE VARS ---------------- #}
{# ThemeWare: Adjustments on the account button #}
{# HC-Architecture @Doku #}
{% block layout_header_actions_account_widget_dropdown_button %}
{% if twtHeaderAccountBtnCompatibility == 2 %}
{# ThemeWare: Add title-attribute #}
<button class="btn account-menu-btn header-actions-btn" title="{{ "twt.header.accountText"|trans }}"
type="button"
id="accountWidget"
data-offcanvas-account-menu="true"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false"
aria-label="{{ "account.myAccount"|trans|striptags }}"
title="{{ "account.myAccount"|trans|striptags }}">
{# ThemeWare: Icon austauschen & Wrapper um Icon ergänzen. #}
<span class="header-account-icon">
{% if twtIconSet is not same as ('default') %}
{% sw_icon 'avatar' style {'pack':'themeware'} %}
{% else %}
{% sw_icon 'avatar' %}
{% endif %}
</span>
{# ThemeWare: Label "Mein Konto" ergänzen. #}
<span class="header-account-name">
{{ "twt.header.accountText"|trans }}
</span>
{# ThemeWare: "Angemeldet-Badge" ergänzen. #}
{% if twtHeaderActionsAccountMenuBtnBadgeShow == 2 and context.customer is not empty %}
<span class="badge badge-primary twt-header-logged-in-badge">✓</span>
{% endif %}
</button>
{% else %}
{# Default block #}
{{ parent() }}
{% endif %}
{% endblock %}