{% sw_extends '@parent/storefront/section/cms-section-block-container.html.twig' %}
{# Shopware adds has--sidebar class to its blocks, we dont want those for Okeonline Sections #}
{% block section_content_block_row %}
{% set salesChannelLanguage = context.salesChannel.languageId %}
{# Get attributes by block.name #}
{% set languageAttributes = block.name|split(' ')|filter(v => v starts with 'lang-') %}
{% set blockHasLanguageSwitch = languageAttributes|length > 0 %}
{% set showForCurrentLanguage = languageAttributes|filter(v => v == 'lang-'~salesChannelLanguage)|length > 0 %}
{% if blockHasLanguageSwitch is not true or showForCurrentLanguage %}
{% set isOkeonlineSection = sectionClasses|filter(sectionClass => '-oo_' in sectionClass)|length > 0 %}
{% set sidebarClasses = isOkeonlineSection ? '' : sidebarClasses %}
<div class="cms-block-container-row row cms-row {{ sidebarClasses }}">
{% sw_include "@Storefront/storefront/block/cms-block-" ~ block.type ~ ".html.twig" ignore missing %}
</div>
{% endif %}
{% endblock %}