<div class="cc-order">
    <div class="cc-order__head">
        {{#if store}}
            <div class="cc-order__store">
                <i class="cc-order-icon fas fa-store"></i>
                {{store}}
            </div>
            <a href="#" class="cc-order__change">
                Change Store location
            </a>
        {{else}}
            <div class="cc-order__store-select">
                <div class="cc-order__store cc-order__store-unselected">
                    <i class="cc-order-icon fas fa-exclamation-circle"></i>
                    <a href="#">
                        Select store location
                    </a>
                </div>
            </div>
        {{/if}}
    </div>
    <div class="cc-order__info bw {{#if store}}cc-order__info-hide{{/if}}"  data-product="103125">
        <div class="cc-order__close">
            <a href="#" class="cc-order__close-link">
                Close
            </a>
        </div>
        <div class="cc-order__section cc-order__section-find">
            <div class="cc-order__section-info">
                <div class="stock__postcode">
                    <label class="stock__postcode_label">
                        <input type="text" class="stock__input tbx" name="bw-postcode">
                        <button class="btn btn-secondary stock__target">
                            <span class="btn__text">
                                <i class="far fa-crosshairs"></i>
                            </span>
                        </button>
                    </label>
                    <span class="stock__postcode_invalid-msg">
                    Check that you entered a valid postcode or place name.
                </span>
                </div>
                <div class="stock__quest">
                    {{> checkbox
                            id="stock-only"
                            label="Only show stores with stock."
                            checked=true
                            class="stock__quest_check"
                    }}
                    {{> checkbox
                            id="cc-only"
                            label="Only show stores with Click & Collect."
                            checked=true
                            class="stock__quest_check"
                    }}
                </div>
            </div>
            <div class="cc-order__section-cta">
                <button class="btn btn_full btn-primary">
                <span class="btn__text">
                    Find Stores
                </span>
                </button>
            </div>
        </div>
        {{#if otherStores}}
            <div class="cc-order__section cc-order__section-list">
                <div class="cc-order__section-info">
                    <div class="stock__list">
                        {{#each otherStores}}
                            <div class="stock__item">
                                <div class="stock__radio">
                                    {{> radiobutton  name="store" id="stock-store" checked=checked}}
                                </div>
                                {{> store-preview
                                        class="stock__store"
                                        id=id
                                        name=name
                                        amount=amount
                                        distance=distance
                                }}
                                <p class="stock__valid">
                                    We’re sorry Click & Collect is temporarily unavailable at this store.
                                    Please choose another store.
                                </p>
                            </div>
                        {{/each}}
                    </div>
                </div>
                <div class="cc-order__section-cta">
                    <input type="hidden" name="storeNamePost" value="12345" class="storeNamePost"/>
                    <button class="btn btn_full btn-action" id="update_store_{{index}}">
                <span class="btn__text">
                    Update
                </span>
                    </button>
                </div>
            </div>
        {{/if}}
        {{#each otherStores}}
            <div class="cc-order__store-info store-info store-info-hide">
                <div class="store-info__header">
                    <div class="store-info__name">
                        <span class="store-info__name-name">
                            {{name}}
                        </span>
                        Store information
                    </div>
                    <a href="#" class="store-info__hide-info">
                        Hide Store Information
                    </a>
                </div>
                <div class="store-info__info">
                    <div class="store-info__phone">
                        Phone: <a href="tel:{{ phone }}">
                        <span class="store-info__phone_val">{{ phone }}</span>
                    </a>
                    </div>
                    <div class="store-info__address">
                        <div class="store-info__address-text">
                            <span class="store-info__address-value">
                                {{ address }}
                            </span>
                            <div class="store-info__postcode">
                                Sat Nav Postcode: <span class="store-info__postcode_val"> {{ postcode }}</span>
                            </div>
                        </div>
                        <a href="#" class="store-info__copy">
                            <span class="store-info__copy_text">
                                Copy Address
                            </span>
                        </a>
                    </div>

                    <div class="store-info__action">
                        <a href="#" class="store-info__tgl-map">
                            <i class="far fa-map-marker-alt"></i>
                            <span class="store-info__tgl-map_text">
                         Show Map
                    </span>
                        </a>
                    </div>
                    <div class="store-info__map store-info__map_hide">
                        <div class="map store-locator-popup__map">
                            {{> google-map }}
                        </div>
                    </div>
                    <div class="store-info__open">
                        <p class="store-info__open_title">
                            Opening Times
                        </p>
                        <table class="store-info__table store-info__table_regular">
                            {{#each openingTimes}}
                                <tr class="store-info__table_row">
                                    <td class="store-info__table_cell">
                                        {{day}}
                                    </td>
                                    <td class="store-info__table_cell">
                                        {{time}}
                                    </td>
                                </tr>
                            {{/each}}
                        </table>
                    </div>
                    {{#unless defStore}}
                        <div class="store-info__open store-info__open_special">
                            <p class="store-info__open_title">
                                Special Opening Times
                            </p>
                            <table class="store-info__table  store-info__table_special">
                                {{#each specialOpeningTimes}}
                                    <tr class="store-info__table_row">
                                        <td class="store-info__table_cell">
                                            {{name}}
                                        </td>
                                        <td class="store-info__table_cell store-info__table_time" rowspan="2">
                                            {{time}}
                                        </td>
                                    </tr>
                                    <tr class="store-info__table_row store-info__table_day">
                                        <td class="store-info__table_cell">
                                            {{day}}
                                        </td>
                                    </tr>
                                {{/each}}
                            </table>
                        </div>
                    {{/unless}}
                </div>
            </div>
        {{/each}}
    </div>
</div>
