{% sw_extends '@Storefront/storefront/page/product-detail/tabs.html.twig' %}
{% block page_product_detail_tabs_inner %}
{% set videosAvailable = false %}
{% set downloadsAvailable = false %}
{% for fieldKey, fieldValue in page.product.customFields %}
{% if 'product_videos' in fieldKey %}
{% set videosAvailable = true %}
{% elseif 'product_downloads' in fieldKey %}
{% set downloadsAvailable = true %}
{% endif %}
{% endfor %}
{{ parent() }}
{% endblock %}
{% block page_product_detail_tabs_navigation_container %}
<ul class="nav nav-tabs product-detail-tab-navigation-list"
id="product-detail-tabs"
role="tablist">
{{ block('page_product_detail_tabs_navigation_description') }}
{% if videosAvailable %}
{% block page_product_detail_tabs_navigation_videos %}
<li class="nav-item">
<a class="nav-link product-detail-tab-navigation-link"
id="videos-tab"
data-toggle="tab"
data-offcanvas-tabs="true"
href="#videos-tab-pane"
role="tab"
aria-controls="videos-tab-pane"
aria-selected="false">
<span>{{ "ATNTheme.detail.tabs.videosTitle"|trans|sw_sanitize }}</span>
<span class="product-detail-tab-navigation-icon">
{% sw_icon 'arrow-medium-right' style {'pack':'solid'} %}
</span>
</a>
</li>
{% endblock %}
{% endif %}
{% if downloadsAvailable %}
{% block page_product_detail_tabs_navigation_downloads %}
<li class="nav-item">
<a class="nav-link product-detail-tab-navigation-link"
id="downloads-tab"
data-toggle="tab"
data-offcanvas-tabs="true"
href="#downloads-tab-pane"
role="tab"
aria-controls="downloads-tab-pane"
aria-selected="false">
<span>{{ "ATNTheme.detail.tabs.downloadsTitle"|trans|sw_sanitize }}</span>
<span class="product-detail-tab-navigation-icon">
{% sw_icon 'arrow-medium-right' style {'pack':'solid'} %}
</span>
</a>
</li>
{% endblock %}
{% endif %}
{{ block('page_product_detail_tabs_navigation_review') }}
</ul>
{% endblock %}
{% block page_product_detail_tabs_content_container %}
<div class="tab-content">
{{ block('page_product_detail_tabs_content_description') }}
{% if downloadsAvailable %}
{% block page_product_detail_tabs_content_videos %}
<div class="tab-pane fade"
id="videos-tab-pane"
role="tabpanel"
aria-labelledby="videos-tab">
{% sw_include '@ATNTheme/storefront/page/product-detail/videos.html.twig' %}
</div>
{% endblock %}
{% endif %}
{% if downloadsAvailable %}
{% block page_product_detail_tabs_content_downloads %}
<div class="tab-pane fade"
id="downloads-tab-pane"
role="tabpanel"
aria-labelledby="downloads-tab">
{% sw_include '@ATNTheme/storefront/page/product-detail/downloads.html.twig' %}
</div>
{% endblock %}
{% endif %}
{{ block('page_product_detail_tabs_content_review') }}
</div>
{% endblock %}