{# Customer profile dropdown shown in the storefront navbar next to the cart. Trigger shows an initials avatar, the customer's name and their account type (personal / company); clicking opens a quick-navigation menu. The host template provides the wrapper
. #} {# initials from the name, e.g. "Filip Priec" -> "FP" #} {% set _name = customer_name | default(value='') | trim %} {% set _parts = _name | split(pat=' ') %} {% set _initials = _parts.0 | truncate(length=1, end='') | upper %} {% if _parts | length > 1 %}{% set _second = _parts | last | truncate(length=1, end='') | upper %}{% set _initials = _initials ~ _second %}{% endif %} {% if customer_account_type == "company" %}{% set _type_label = t(key="account-company", lang=lang | default(value='sk')) %}{% else %}{% set _type_label = t(key="account-personal", lang=lang | default(value='sk')) %}{% endif %}