{% sw_extends '@Storefront/storefront/component/product/listing.html.twig' %}
{% set b2bListingView = 'listing' %}
{% if app.request.get('b2bListingView') %}
{% set b2bListingView = app.request.get('b2bListingView') %}
{% endif %}
{% set params = params|merge({ 'b2bListingView': b2bListingView }) %}
{% block element_product_listing_sorting %}
{% if b2bSuite and b2b_acl_check('b2bfastorder', 'index') %}
<div class="b2b__listing-toggle js--b2b-listingview-mode">
<button class="btn {% if b2bListingView == 'table' %}btn-outline-primary{% else %}btn-primary{% endif %}">
{% sw_icon 'view-grid' %}
</button>
<button class="btn {% if b2bListingView == 'table' %}btn-primary{% else %}btn-outline-primary{% endif %}">
{% sw_icon 'align-justify' %}
</button>
</div>
{% endif %}
{{ parent() }}
{% endblock %}
{% block element_product_listing_col %}
{% if b2bSuite and b2bListingView == 'table' %}
{% sw_include '@SwagB2bPlatform/storefront/_custom/product-listing/b2b-listing.html.twig' %}
{% else %}
{{ parent() }}
{% endif %}
{% endblock %}
{% block element_product_listing_pagination_nav_bottom %}
{% if b2bSuite and b2bListingView == 'table' %}
<div class="module-listingview__pagination">
{{ parent() }}
</div>
{% else %}
{{ parent() }}
{% endif %}
{% endblock %}