<li>
    <a href="{% unless sub_menu != blank or link.links.size > 0 %}{{ link.url }}{% endunless %}" class="h4 {% if sub_menu != blank or link.links.size > 0 %} no-click-events{% endif %}" {% render 'overwrite-theme-style', settings: sectionSettings %}>
        {%- if title != blank -%}
            {{ title }}
        {%- else -%}
            {{ link.title }}
        {%- endif -%}

        {%- if sub_menu != blank or link.links.size > 0 -%}
            {% render 'icon-arrow-down' %}
        {%- endif -%}
    </a>

    {% comment %} SUB LINK LIST {% endcomment %}
    {% if sub_menu != blank %}
        <ul class="header-menu-sub-links">{{ sub_menu }}</ul>
    {% elsif link.links.size > 0 %}
        <ul class="header-menu-sub-links {% if is_for_shrinked_sub_menu %}header-menu-sub-sub-links{% endif %}">
            {%- for link in link.links -%}
                <li>
                    <a href="{% unless link.links.size > 0 %}{{ link.url }}{% endunless %}" class="h4 {% if link.links.size > 0 %} no-click-events{% endif %}" {% render 'overwrite-theme-style', settings: blockSettings %}>
                        {{ link.title }}

                        {%- if link.links.size > 0 -%}
                            {% render 'icon-arrow-down' %}
                        {%- endif -%}
                    </a>

                    {% comment %} SUB SUB LINK LIST {% endcomment %}
                    {% if link.links.size > 0 %}
                        <ul class="header-menu-sub-links header-menu-sub-sub-links">
                            {%- for link in link.links -%}
                                <li>
                                    <a href="{{ link.url }}" class="h4" {% render 'overwrite-theme-style', settings: blockSettings %}>
                                        {{ link.title }}
                                    </a>
                                </li>
                            {%- endfor -%}
                        </ul>
                    {% endif %}
                    {% comment %} SUB SUB LINK LIST END {% endcomment %}
                </li>
            {%- endfor -%}
        </ul>
    {% endif %}
    {% comment %} SUB LINK LIST END {% endcomment %}
</li>