{# Sets blank layout if another page if ajax request or if another page is request as home for non-clients #}

{% extends request.ajax or (not client and settings.home_page != 'menuicons') ? 'layout_blank.phtml' : 'layout_default.phtml' %}

{% import 'macro_functions.phtml' as mf %}

{% block meta_title %}{{ 'Client Area'|trans }}{% endblock %}

{% if not settings.home_sidemenu %}
    {% if not client %}{% set side_menu = 'hidden' %}{% endif %}
{% endif %}

{% block content_before %}
    {% if client %}
        <h1 class="visually-hidden">{{ 'Dashboard'|trans }}</h1>
    {% else %}
        {% if settings.home_page == 'menuicons' %}
            <h1 class="visually-hidden">{{ 'Home'|trans }}</h1>
        {% endif %}
    {% endif %}
{% endblock %}

{% block content %}
    {% if client %}
        {% include 'Index/_index-client.phtml' %}
    {% else %}
        {% if settings.home_page == 'menuicons' %}
            {% include 'Index/_index-anonymous.phtml' %}
        {% elseif settings.home_page == 'order' %}
            {% include 'mod_order_index.phtml' %}
        {% elseif settings.home_page == 'blog' %}
            {% include 'mod_news_index.phtml' %}
        {% elseif settings.home_page == 'login' %}
            {% include 'mod_page_login.phtml' %}
        {% elseif settings.home_page == 'contact' %}
            {% include 'mod_support_contact_us.phtml' %}
        {% elseif settings.home_page == 'kb' %}
            {% include 'mod_kb_index.phtml' %}
        {% endif %}
    {% endif %}
{% endblock %}
