<h3 class="account-heading">{{lang 'account.orders.heading' }}</h3>

<ul class="account-list">
    {{#each orders}}
    <li class="account-listItem">
        <div class="account-product">
            <div class="account-product-figure">
                {{#if items.0.type '===' 'giftcertificate'}}
                    <img
                        alt="GiftCertificate"
                        title="GiftCertificate"
                        src="{{cdn ../theme_settings.default_image_gift_certificate}}">
                {{else}}
                    {{> components/common/responsive-img
                        image=image
                        class="account-product-image"
                        fallback_size=../theme_settings.productthumb_size
                        lazyload=../theme_settings.lazyload_mode
                        default_image=../theme_settings.default_image_product
                    }}
                {{/if}}
            </div>
            <div class="account-product-body">
                <div class="account-orderStatus">
                    <h6 class="account-orderStatus-label">{{this.status}}</h6>
                    {{#if ../settings.returns_enabled}}
                        {{#if this.return_url}}
                            <a class="account-orderStatus-action" href="{{this.return_url}}">
                                {{lang 'account.orders.return_items' }}
                            </a>
                        {{/if}}
                    {{/if}}
                </div>

                <h5 class="account-product-title">
                    <a href="{{this.details_url}}">{{lang 'account.orders.list.order_number' number=this.id}}</a>
                </h5>
                <p class="account-product-description">{{lang 'account.orders.list.product_details' num_products=this.total_quantity cost=this.total.formatted}}</p>

                <div class="account-product-details">
                    <div class="account-product-detail">
                        <h6 class="account-product-detail-heading">{{lang 'account.orders.order_placed' }}</h6>
                        <span>{{this.date}}</span>
                    </div>
                    <div class="account-product-detail">
                        <h6 class="account-product-detail-heading">{{lang 'account.orders.last_update' }}</h6>
                        <span>{{this.last_update_date}}</span>
                    </div>
                </div>
            </div>
        </div>
    </li>
    {{/each}}
</ul>
