{% extends '/layouts/default.twig' %}

{% block site_body %}
    {% set account_pages = [
        {type: 'link', label: 'Dashboard', url: 'account-dashboard.html'},
        {type: 'link', label: 'Garage', url: 'account-garage.html'},
        {type: 'link', label: 'Edit Profile', url: 'account-profile.html'},
        {type: 'link', label: 'Order History', url: 'account-orders.html'},
        {type: 'link', label: 'Order Details', url: 'account-order-details.html'},
        {type: 'link', label: 'Addresses', url: 'account-addresses.html'},
        {type: 'link', label: 'Edit Address', url: 'account-edit-address.html'},
        {type: 'link', label: 'Password', url: 'account-password.html'},
        {type: 'divider'},
        {type: 'link', label: 'Logout', url: 'account-login.html'}
    ] %}

    {% include '/blocks/block-space.twig' with {inputs: {layout: 'after-header'}} %}

    <div class="block">
        <div class="container container--max--xl">
            <div class="row">
                <div class="col-12 col-lg-3 d-flex">
                    <div class="account-nav flex-grow-1">
                        <h4 class="account-nav__title">Navigation</h4>
                        <ul class="account-nav__list">
                            {% for link in account_pages %}
                                {% if link.type == 'link' %}
                                    <li class="account-nav__item {% if link.url == global_current_account_page %} account-nav__item--active {% endif %}">
                                        <a href="{{ link.url }}">{{ link.label }}</a>
                                    </li>
                                {% elseif link.type == 'divider' %}
                                    <li class="account-nav__divider" role="presentation"></li>
                                {% endif %}
                            {% endfor %}
                        </ul>
                    </div>
                </div>
                <div class="col-12 col-lg-9 mt-4 mt-lg-0">
                    {% block account_body %}{% endblock %}
                </div>
            </div>
        </div>
    </div>

    {% include '/blocks/block-space.twig' with {inputs: {layout: 'before-footer'}} %}
{% endblock %}
