{{#each orderBlock}}
    <div class="order-block">
        {{#unless ../productLineOnly}}
            <div class="order-block__time-head">
            {{#if loader}}
            <div class="order-block__loader">
                <div class="loader-line"></div>
            </div>
            {{else}}
                <span>
                    <i class="iconHead {{iconHead}}"></i>{{timeHead}}
                    <span class="boldDate">{{dateHead}}</span>
                </span>
                <span class="order-block__time-head-info">{{infoTimeHead}}</span>
            {{/if}}
            </div>

            <div class="order-block__address">
                <div class="order-block__address-wrap">
                    <div class="order-block__address-info">
                        <i class="fas fa-map-marker-alt"></i> {{address}}
                    </div>
                    {{#if storeInfo}}
                        <button class="btn btn-link underline-link show-info">Show Store Information</button>
                    {{else if editAddress}}
                        {{#if ../modalGuest}}
                            <button class="btn btn-link underline-link edit-address" data-toggle="modal" data-target="#modalDeliveryEdit">Edit Address</button> 
                        {{else}}
                            <button class="btn btn-link underline-link edit-address" data-toggle="modal" data-target="#modalEditAddress">Edit Address</button> 
                        {{/if}}
                    {{/if}}
                </div>

                {{#if storeInfo}}
                    {{> store-info }}
                {{/if}}
            </div>
        {{/unless}}

        <div class="order-block__product-line">
            <button class="btn btn-link underline-link show-products {{#if ../noCollapsed}}d-none{{/if}}">Show {{header}} Products</button>
            <button class="btn btn-link underline-link hide-products {{#if ../noCollapsed}}d-none{{/if}}">Hide {{header}} Products</button>
            <div class="{{#unless ../noCollapsed}}order-block__product-info{{/unless}}">
                {{#each orderLine}}
                    <div class="order-block__order-line">
                        <div class="order-line__wrap">
                            <div class="order-line__image">
                            <a href="#">
                                <img class="image" src="{{img}}" alt="{{productName}}" title="{{productName}}">
                            </a>
                            </div>

                            <div class="order-line__info">
                                <div class="order-line__product">
                                <div class="order-line__name">
                                    <a href="#">{{productName}}</a>
                                </div>
                                    <div class="order-line__quantity">x<span class="value">{{quantity}}</span></div>
                                </div>

                                {{#if promo}}
                                    <div class="order-line__promo">{{promo}}</div>
                                {{/if}}
                            </div>
                        </div>

                        <div class="order-line__price">

                            <div class="order-line__price-item">
                                {{#if area-total}}
                                    <span>Area total:</span>
                                    <div class="price-item__info">
                                        <div>{{area-total}} SQM</div>
                                        <div class="order-line__value_note">(Square Metres)</div>
                                        {{#if wastage-present}}
                                            <div class="order-line__value_wst">
                                                <div>{{area-total-ws}} SQM</div>
                                                <div class="order-line__value_note">(with 10% wastage)</div>
                                            </div>
                                        {{/if}}
                                    </div>
                                {{/if}}
                            </div>

                            <div class="order-line__price-item">
                                {{#if price}}
                                    <span>Item price:</span>
                                    <div class="price-item__info">
                                        <div>{{price}}</div>
                                        {{#if perSQM}}
                                            <div class="order-line__value_note">{{ perSQM }} per SQM</div>
                                        {{/if}}
                                    </div>
                                {{/if}}
                            </div>

                            <div class="order-line__price-item">
                                <span>Total:</span>
                                <span>{{total}}</span>
                            </div>
                        </div>

                        {{#if notification-page}}
                            <div class="order-line__calculator-notification">
                                {{> notifications notification-page.success-tiles-call-back}}
                            </div>
                        {{/if}}


                        {{#if supplier}}
                            <div class="supplier-block">
                                <i class="fas fa-exclamation-circle"></i>
                                <span class="supplier-block__title">Wickes Supplier</span> - Delivery within 14 days
                            </div>
                        {{/if}}
                    </div>
                {{/each}}
            </div>
        </div>
    </div>
{{/each}}
