{% block element_product_desciption_reviews %}
{% set product = element.data.product %}
{# Please keep in mind that the ID of the tabs is being used to DYNAMICALLY include twig templates. Therefore this entire functionality depends on the existence of those templates. #}
{% set tabs = [
{
'name': "pages.product.tab-details-title",
'id': 'details',
},
{
'name': "pages.product.tab-size-title",
'id' : 'size-fit',
},
{
'name' : "pages.product.tab-delivery-return-title",
'id' : 'delivery-return',
}
] %}
{% if config('core.listing.showReview') %}
{% set tabs = tabs|merge([
{
'name': "detail.tabsReview",
'id': 'reviews',
},
]) %}
{% endif %}
{% if element.data.product %}
{% block product_description_tabs %}
<div class="section-p-y xl:mt-14">
{% block product_description_tabs_nav %}
<nav class="product-detail-tab-navigation product-description-reviews-tab-navigation">
<ul class="nav nav-tabs flex grid-gap-4 overflow-x-auto md:justify-center md:overflow-x-hidden lg:grid-gap-x-20"
id="product-detail-tabs"
role="tablist">
{% for tab in tabs %}
{% block product_description_tabs_nav_item %}
<li class="nav-item first:ml-8 last:mr-8 md:first:ml-0 md:last:mr-0">
<a class="nav-link tab-trigger block py-2 border-b border-transparent text-grey-600 text-lg font-light whitespace-nowrap transition hover:border-b-black hover:text-black md:py-3 lg:text-3xl {% if loop.first %}active{% endif %}"
id="{{ tab.id }}-tab"
data-toggle="tab"
href="#{{ tab.id }}-tab-pane"
role="tab"
aria-controls="{{ tab.id }}-tab-pane"
aria-selected="true">
{{ tab.name|trans|raw }}
</a>
</li>
{% endblock %}
{% endfor %}
</ul>
</nav>
{% endblock %}
{% block product_description_tabs_content %}
<div class="product-detail-tabs-content boxed-layout mt-6 md:max-w-[540px] md:mx-auto lg:!max-w-[750px]">
<div class="tab-content">
{% for tab in tabs %}
{% block product_description_tabs_content_item %}
<div class="tab-pane fade show {% if loop.first %}active{% endif %}"
id="{{ tab.id }}-tab-pane"
role="tabpanel"
aria-labelledby="{{ tab.id }}-tab">
{# Please keep in mind that the ID of the tabs is being used to DYNAMICALLY include twig templates.
Therefore this entire functionality depends on the existence of those templates. #}
{% sw_include '@Storefront/storefront/page/product-detail/tabs/'~ tab.id ~'.html.twig' ignore missing with {
tab: tab
} %}
</div>
{% endblock %}
{% endfor %}
</div>
</div>
{% endblock %}
</div>
{% endblock %}
{% endif %}
{% endblock %}