{% if (enable_avatar_header_box or username_header_box or enable_header_follow_button or enable_bio_header_box) %}
    {% include 'view/header-box/header-box.twig' %}
{% endif %}

{% if is_pro and layout_type == "slider" %}
    <div class="inavii-ajax inavii-skeleton-container {{ is_mobile ? 'inavii-is-mobile' : '' }} inavii-box-swiper {{ display_navigation }}"
         data-settings="{{ widgetSettings|json_encode|e('html_attr') }}">

        {% if is_pro %}
            {% if dynamic_content == "" %}
                {% include 'view/skeleton/skeleton-slider.twig' %}
            {% endif %}

            {% if dynamic_content is defined and dynamic_content is not empty %}
                {{ dynamic_content|raw }}
            {% endif %}
        {% endif %}
    </div>

    <div class="swiper-pagination inavii-slider-pagination"></div>
{% else %}
    <div class="inavii-ajax inavii-skeleton-container {{ is_mobile ? 'inavii-is-mobile' : '' }} inavii-grid{{ layout_type != '' ? ' inavii-grid__type-' ~ layout_type }}"
         data-items-mobile="{{ items_mobile }}" data-settings="{{ widgetSettings|json_encode|e('html_attr') }}"

            {% if is_pro %} {% include 'view/helpers/masonry-vertical-options.twig' %} {% endif %}
            {% if is_pro %} {% include 'view/helpers/cards-options.twig' %} {% endif %}>


        {% if dynamic_content == "" %}
            {% if (layout_type == 'grid' or layout_type == 'gallery') %}
                {% include 'view/skeleton/skeleton-grid.twig' %}
            {% endif %}

            {% if (layout_type == 'row') %}
                {% include 'view/skeleton/skeleton-row.twig' %}
            {% endif %}

            {% if (layout_type == 'wave') %}
                {% include 'view/skeleton/skeleton-wave.twig' %}
            {% endif %}

            {% if is_pro %}
                {% if (layout_type == 'cards' or layout_type == 'content-grid') %}
                    {% include 'view/skeleton/skeleton-grid.twig' %}
                {% endif %}

                {% if (layout_type == 'shape-matrix' or layout_type == 'creative-grid') %}
                    {% include 'view/skeleton/skeleton-matrix.twig' %}
                {% endif %}

                {% if (layout_type == 'wave-grid') %}
                    {% include 'view/skeleton/skeleton-wave-grid.twig' %}
                {% endif %}

                {% if (layout_type == 'highlight') %}
                    {% include 'view/skeleton/skeleton-highlight.twig' %}
                {% endif %}

                {% if (layout_type == 'highlight-super') %}
                    {% include 'view/skeleton/skeleton-highlight-super.twig' %}
                {% endif %}

                {% if (layout_type == 'highlight-focus') %}
                    {% include 'view/skeleton/skeleton-highlight-focus.twig' %}
                {% endif %}

                {% if (layout_type == 'masonry-horizontal') %}
                    {% include 'view/skeleton/skeleton-masonry-horizontal.twig' %}
                {% endif %}

                {% if (layout_type == 'masonry-vertical') %}
                    {% include 'view/skeleton/skeleton-masonry-vertical.twig' %}
                {% endif %}
            {% endif %}
        {% endif %}

        {% if dynamic_content is defined and dynamic_content is not empty %}
            {{ dynamic_content|raw }}
        {% endif %}

    </div>
{% endif %}

{% if (enable_follow_button or enable_load_more_button) %}
    {% include 'view/buttons.twig' %}
{% endif %}
