{% sw_extends '@Storefront/storefront/base.html.twig' %}
{% block base_navigation_inner %}
{% if not b2bPlatformConfig.navigationOnlyLoggedIn or context.customer %}
{% if context.extensions.b2bPlatformContext %}
{% if employee_permission(['viewListing']) and not context.customer.customFields.b2b_sales_representative %}
{{ parent() }}
{% endif %}
{% else %}
{{ parent() }}
{% endif %}
{% endif %}
{% endblock %}
{% block base_body_classes %}
{% apply spaceless %}
{% if context.extensions.b2bPlatformContext is defined %}
{% if isSalesRepresentative %}
{% set isSalesRepClass = 'is-b2b-sales-representative' %}
{% endif %}
{% if loggedInAsCustomer %}
{% set loggedInAsCustomerClass = 'is-b2b-sales-representative-logged-in-as-customer' %}
{% endif %}
{% if isEmployee %}
{% set isEmployeeClass = 'is-b2b-employee' %}
{% endif %}
{% if isEmployee and context.extensions.b2bPlatformContext.customerAdmin %}
{% set isEmployeeAdminClass = 'is-b2b-employee-admin' %}
{% endif %}
{% if isEmployee and employee.loggedInCustomer.role %}
{% set role = employee.loggedInCustomer.role.translated.name %}
{% set employeeRoleClass = 'is-b2b-employee-'.role|trim|lower %}
{% endif %}
{% endif %}
{{ parent() }} {{ isSalesRepClass }} {{ loggedInAsCustomerClass }} {{ isEmployeeClass }} {{ isEmployeeAdminClass }} {{ employeeRoleClass }}
{% endapply %}
{% endblock %}
{% block base_script_router %}
{{ parent() }}
<script>
window.router['frontend.widgets.login-target'] = '{{ path('frontend.widgets.login-target') }}';
window.router['frontend.b2b_express_checkout.index'] = '{{ path('frontend.b2b_express_checkout.index') }}';
</script>
{% block base_script_router_b2b_product_list %}
{% if b2b_feature_enabled('B2bProductLists') %}
<script>
window.router['widgets.product-list.create'] = '{{ path('widgets.product-list.create') }}';
window.router['widgets.product-list.overview'] = '{{ path('widgets.product-list.overview') }}';
</script>
{% endif %}
{% endblock %}
{% endblock %}