{% set width = element.width ?? 100 %}

{% embed '@DediSyliusCmsPlugin/Shop/UiElement/Grids/column-' ~ width ~ '.html.twig' %}
    {% block content %}
        <section class="block-section block-media-text {{ element.mediaBeforeText ? 'left' : 'right' }}">
            <div class="row">
                <div class="col-md-6">
                    {% include '@DediSyliusTheme/Blocks/_block-media.html.twig' with {'element':element.media, 'width':'0'} %}
                </div>

                <div class="col-md-6">
                    {% set text = element.text  %}
                    {% if element.text.link is defined and element.text.link.link is not empty %}
                        {% set link = text.link  %}
                        {% if link.style is not defined %}
                            {% set link = link|merge({ 'style': 'outline-primary' }) %}
                            {% set text = text|merge({'link' : link}) %}
                        {% endif %}
                    {% endif %}
                    {% include '@DediSyliusTheme/Blocks/_block-text.html.twig' with {'element':text} %}
                </div>
            </div>
        </section>
    {% endblock %}
{% endembed %}
