{% sw_extends '@Storefront/storefront/page/account/sidebar.html.twig' %}
{% set isSubAccount = constant('Samson\\CustomFieldSet\\Constants\\CustomerCustomFieldConstants::CUSTOM_FIELD_IS_SUB_ACCOUNT') %}
{% block page_account_sidebar_menu_inner %}
{% block page_account_sidebar_link_home %}
{{ parent() }}
{% endblock %}
{% block page_account_sidebar_link_profile %}
{{ parent() }}
{% endblock %}
{% block page_account_sidebar_link_address %}
{{ parent() }}
{% endblock %}
{% block page_account_sidebar_link_payment %}
{{ parent() }}
{% endblock %}
{% block page_account_sidebar_link_orders %}
{{ parent() }}
{% if not context.customer.customFields[isSubAccount] %}
<a href="{{ path('frontend.account.sub-account.page') }}"
title="{{ "account.subAccountLink"|trans|striptags }}"
class="list-group-item list-group-item-action account-aside-item{% if activeRoute is same as('frontend.account.sub-account.page') %} is-active{% endif %}">
{{ "account.subAccountLink"|trans|sw_sanitize }}
</a>
{% endif %}
{% endblock %}
{% endblock %}