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

<ul class="account-list">
    {{#each order.items}}
        {{#if shipping_rows.length}}
            {{#each shipping_rows}}
                {{#if is_shipping}}
                    <li class="account-listShipping">
                        <h5 class="account-listShipping-title">{{lang 'account.orders.details.ship_to_multi' street=address city=city state=state zip=zip country=country}}</h5>
                    </li>
                {{/if}}
            {{/each}}
        {{/if}}
    <li class="account-listItem">
        <div class="account-product account-product--alignMiddle">
            <div class="account-product-checkItem">
                {{#if show_reorder}}
                    <input class="form-checkbox" type="checkbox" id="account-product-id-{{order_product_id}}" value="{{order_product_id}}">
                    <label for="account-product-id-{{order_product_id}}" class="form-label">
                        <span class="is-srOnly">Checkbox {{order_product_id}} label</span>
                    </label>
                {{/if}}
            </div>
            <figure class="account-product-figure">
                {{#if type '===' 'giftcertificate'}}
                    <img
                        src="{{cdn ../theme_settings.default_image_gift_certificate}}"
                        alt="Gift Certificate"
                        title="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}}
                {{#unless refunded}}
                    {{#if download_url}}
                        <a href="{{download_url}}" class="account-product-download button button--primary">
                            <span class="is-srOnly">{{lang 'account.orders.details.download_items'}}</span>
                            <span class="icon">
                                <svg>
                                    <use href="#icon-arrow-down"></use>
                                </svg>
                            </span>
                        </a>
                    {{/if}}
                {{/unless}}
            </figure>
            <div class="account-product-body">
                <span class="account-product-price">{{price.formatted}}</span>
                <h5 class="account-product-title">{{quantity}} &#215; {{name}}</h5>
                {{#if brand}}
                    <h6>{{brand.name}}</h6>
                {{/if}}
                {{#if options}}
                <dl class="definitionList">
                    {{#each options}}
                        <dt class="definitionList-key">{{name}}:</dt>
                        <dd class="definitionList-value">{{> components/common/product-options}}</dd>
                    {{/each}}
                </dl>
                {{/if}}
                {{#if gift_wrapping_name}}
                    <dl class="definitionList">
                        <dt class="definitionList-key">{{lang 'account.orders.gift_wrapping'}}</dt>
                        <dd class="definitionList-value">{{gift_wrapping_name}}</dd>
                    </dl>
                {{/if}}
                {{#if event_date}}
                    <dl class="definitionList">
                        <dt class="definitionList-key">
                            {{event_date.name}}:
                        </dt>

                        <dd class="definitionList-value">
                            {{event_date.date}}
                        </dd>
                    </dl>
                {{/if}}
                {{#if refunded}}
                    <p class="account-product-refundQty">{{lang 'account.orders.refunded_quantity' qty=refunded_qty}}</p>
                {{else}}
                    {{#if refunded_qty}}
                        <p class="account-product-refundQty">{{lang 'account.orders.refunded_quantity' qty=refunded_qty}}</p>
                    {{/if}}
                {{/if}}
                {{#if reorder_message}}
                    <p>{{{reorder_message}}}</p>
                {{/if}}
            </div>
        </div>
    </li>
    {{/each}}
</ul>
