{#
/*
 * Copyright © ProgramCMS. All rights reserved.
 * See COPYING.txt for license details.
 *
 * Developed by Mohamed EL QUCHIRI <elquchiri@gmail.com>
 */
#}
<h3>{{ block.trans('My Account') }}</h3>
<div class="row mb-5 mt-4">
    <div class="col-md-6">
        <strong class="fs-5 fw-bold">{{ block.trans('Profile') }}</strong>
        <div class="mt-1">
            <p class="m-0">{{ block.getUser().getFullname() }}</p>
            <p class="m-0">{{ block.getUser().getEmail() }}</p>
            <p class="mt-2">
                <a href="{{ block.getEditInformationUrl() }}">{{ block.trans('Edit') }}</a> &middot;
                <a href="{{ block.getEditPasswordUrl() }}">{{ block.trans('Update Password') }}</a>
            </p>
        </div>
    </div>
    <div class="col-md-6">
        <strong class="fs-5 fw-bold">{{ block.trans('Newsletter') }}</strong>
        <div class="mt-1">
            <p class="m-0">{{ block.trans("You're subscribing to General Newsletter") }}</p>
            <p class="mt-2">
                <a href="{{ block.getNewsletterEditUrl() }}">{{ block.trans('Edit') }}</a>
            </p>
        </div>
    </div>
</div>
<div class="row">
    <div class="col-md-6 mb-5">
        <strong class="fs-5 fw-bold">{{ block.trans('Default Address') }}</strong>
        <span class="ms-1 me-1">&mdash;</span>
        <a href="{{ block.getUserAddressesUrl() }}">{{ block.trans('Manage Addresses') }}</a>
        <div class="mt-1">
            {% if(block.getUserDefaultAddress().getFirstname()) %}
            <p class="m-0">{{ block.getUserDefaultAddress().getFirstname() }} {{ block.getUserDefaultAddress().getLastname() }}</p>
            {% endif %}
            {% if(block.getUserDefaultAddress().getStreet()) %}
                <p class="m-0">{{ block.getUserDefaultAddress().getStreet() }}</p>
            {% endif %}
            {% if(block.getUserDefaultAddress().getCity()) %}
                <p class="m-0">{{ block.getUserDefaultAddress().getCity() }}, {{ block.getUserDefaultAddress().getRegion() }}</p>
            {% endif %}
            {% if(block.getUserDefaultAddress().getCountry()) %}
                <p class="m-0">{{ block.getUserDefaultAddress().getCountry() }}</p>
            {% endif %}
            {% if(block.getUserDefaultAddress().getTelephone()) %}
            <p class="m-0">
                {{ block.trans('T:') }}
                <a href="tel:{{ block.getUserDefaultAddress().getTelephone() }}">
                    {{ block.getUserDefaultAddress().getTelephone() }}
                </a>
            </p>
            {% endif %}
            <p class="mt-2">
                <a href="{{ block.getDefaultAddressEditUrl() }}">{{ block.trans('Edit Address') }}</a>
            </p>
        </div>
    </div>
    <div class="col-md-6 mb-5">
        <strong class="fs-5 fw-bold">{{ block.trans('Favorite') }}</strong>
        <div class="mt-1">
            <p class="m-0">{{ block.getFavoriteMessage() }}</p>
            <p class="mt-2">
                <a href="{{ block.getUserFavoriteUrl() }}">{{ block.trans('Go To Favorite List') }}</a>
            </p>
        </div>
    </div>
</div>