{% sw_extends '@Storefront/storefront/page/account/index.html.twig' %} {% block page_account_overview_welcome %}
{% set shopStudioPersonalizedCustomerGreetingCloudConfig = config('ShopStudioPersonalizedCustomerGreetingCloud.config') %} {% if shopStudioPersonalizedCustomerGreetingCloudConfig.staticGreetingEnabled and shopStudioPersonalizedCustomerGreetingCloudConfig.staticGreetingTranslationKey %} {% if shopStudioPersonalizedCustomerGreetingCloudConfig.staticGreetingByFirstNameEnabled %}

{{ shopStudioPersonalizedCustomerGreetingCloudConfig.staticGreetingTranslationKey|trans({'%name%': context.customer.firstName})|sw_sanitize }}

{% elseif shopStudioPersonalizedCustomerGreetingCloudConfig.staticGreetingByFirstNameAndLastNameEnabled %}

{{ shopStudioPersonalizedCustomerGreetingCloudConfig.staticGreetingTranslationKey|trans({'%name%': context.customer.firstName ~ ' ' ~ context.customer.lastName})|sw_sanitize }}

{% elseif context.customer.salutation.salutationKey != 'not_specified' %}

{{ shopStudioPersonalizedCustomerGreetingCloudConfig.staticGreetingTranslationKey|trans({'%name%': context.customer.salutation.translated.displayName ~ ' ' ~ context.customer.lastName})|sw_sanitize }}

{% else %}

{{ "account.overviewTitle"|trans|sw_sanitize }}

{% endif %} {% elseif shopStudioPersonalizedCustomerGreetingCloudConfig.greetingByTimeEnabled %} {% if shopStudioPersonalizedCustomerGreetingCloudConfig.greetingByTimeByFirstNameEnabled %}

{{ shopStudioPersonalizedCustomerGreetingCloudConfig.greetingByTimeMorningTranslationKey|trans({'%name%': context.customer.firstName})|sw_sanitize }}

{% elseif shopStudioPersonalizedCustomerGreetingCloudConfig.greetingByTimeByFirstNameAndLastNameEnabled %}

{{ shopStudioPersonalizedCustomerGreetingCloudConfig.greetingByTimeMorningTranslationKey|trans({'%name%': context.customer.firstName ~ ' ' ~ context.customer.lastName})|sw_sanitize }}

{% elseif context.customer.salutation.salutationKey != 'not_specified' %}

{{ shopStudioPersonalizedCustomerGreetingCloudConfig.greetingByTimeMorningTranslationKey|trans({'%name%': context.customer.salutation.translated.displayName ~ ' ' ~ context.customer.lastName})|sw_sanitize }}

{% else %}

{{ "account.overviewTitle"|trans|sw_sanitize }}

{% endif %} {% if shopStudioPersonalizedCustomerGreetingCloudConfig.greetingByTimeByFirstNameEnabled %}

{{ shopStudioPersonalizedCustomerGreetingCloudConfig.greetingByTimeAfternoonTranslationKey|trans({'%name%': context.customer.firstName})|sw_sanitize }}

{% elseif shopStudioPersonalizedCustomerGreetingCloudConfig.greetingByTimeByFirstNameAndLastNameEnabled %}

{{ shopStudioPersonalizedCustomerGreetingCloudConfig.greetingByTimeAfternoonTranslationKey|trans({'%name%': context.customer.firstName ~ ' ' ~ context.customer.lastName})|sw_sanitize }}

{% elseif context.customer.salutation.salutationKey != 'not_specified' %}

{{ shopStudioPersonalizedCustomerGreetingCloudConfig.greetingByTimeAfternoonTranslationKey|trans({'%name%': context.customer.salutation.translated.displayName ~ ' ' ~ context.customer.lastName})|sw_sanitize }}

{% else %}

{{ "account.overviewTitle"|trans|sw_sanitize }}

{% endif %} {% if shopStudioPersonalizedCustomerGreetingCloudConfig.greetingByTimeByFirstNameEnabled %}

{{ shopStudioPersonalizedCustomerGreetingCloudConfig.greetingByTimeEveningTranslationKey|trans({'%name%': context.customer.firstName})|sw_sanitize }}

{% elseif shopStudioPersonalizedCustomerGreetingCloudConfig.greetingByTimeByFirstNameAndLastNameEnabled %}

{{ shopStudioPersonalizedCustomerGreetingCloudConfig.greetingByTimeEveningTranslationKey|trans({'%name%': context.customer.firstName ~ ' ' ~ context.customer.lastName})|sw_sanitize }}

{% elseif context.customer.salutation.salutationKey != 'not_specified' %}

{{ shopStudioPersonalizedCustomerGreetingCloudConfig.greetingByTimeEveningTranslationKey|trans({'%name%': context.customer.salutation.translated.displayName ~ ' ' ~ context.customer.lastName})|sw_sanitize }}

{% else %}

{{ "account.overviewTitle"|trans|sw_sanitize }}

{% endif %} {% else %}

{{ "account.overviewTitle"|trans|sw_sanitize }}

{% endif %} {{ block('page_account_overview_welcome_intro') }} {% if page.customer.requestedGroup %} {% sw_include '@Storefront/storefront/utilities/alert.html.twig' with { type: 'info', content: 'account.overviewCustomerGroupRequest'|trans({ '%group%': page.customer.requestedGroup.translated.name }) } %} {% endif %}
{% endblock %}