<div class="bw {{#if unhappy}}bw_unhappy{{/if}}">
    <div class="bw__chosen chosen {{#if isUserNonRegistered}}chosen_hide{{/if}} {{#unless isUserNonRegistered}}proto-only-populated{{/unless}}">
        <div class="chosen__notif">
            {{> notifications bigWins.notifications.success}}
            {{> notifications bigWins.notifications.error}}
        </div>
        {{> store-preview
                class="chosen__item"
                name=nearestName
                amount=nearestAmount
                distance=nearestDistance}}
        <p class="stock__valid">
            We’re sorry Click & Collect is temporarily unavailable at this store.
            Please choose another store.
        </p>
        <button class="btn btn-action btn_full bw__cc-btn {{#if nearest-purchase}}nearest-store-purchasable{{/if}}">
            <span class="btn__text">Click & Collect</span>
        </button>
        {{> default-store-preview
                class="chosen__item"
                toBeDefaultName=toBeDefaultName
                inStock=true
                outStock=false
                amount="12"
                distance=distance
                current-store-details=current-store-details
                currentDefaultName="Watford"}}
        {{> stock-reserve class="chosen__msg"}}
    </div>
    <div class="bw__stock stock">
        <div class="stock__accordion non-reg"
            data-toggle="collapse"
            data-target="#{{stock-accordion}}"
            aria-expanded="true"
        >
            <div class="stock__head non-reg">
                <span class="non-reg__text">Click & Collect</span>
            </div>
        </div>

        <div class="stock__head">
            <div class="stock__close">
                <i class="far fa-times"></i>
            </div>
        </div>

        <div class="stock__info collapse {{#unless isUserNonRegistered}}show{{/unless}}" id="{{stock-accordion}}">
            <div class="stock__tabs {{#if more-stores-present}}more-stores-present{{/if}}">
                <div class="stock__tab active" data-stores="nearest">
                    Nearest Store
                </div>
                <div class="stock__tab" data-stores="more">
                    More Stores
                </div>
            </div>
            <div class="stock__content">
                <div class="stock__find">
                    <div class="stock__params">
                        <div class="stock__quant">
                            <label for="quantity-field" class="quantity-label">Quantity:
                                <input type="text" inputmode="numeric" pattern="[0-9]*"
                                       class="tbx tbx_quantity"
                                       value="1">
                            </label>
                        </div>
                        <span class="stock__price">
                        £<span class="stock__price-val">149.99</span>
                    </span>
                    </div>
                    <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"
                        }}
                        {{> info-icon
                                title="We offer a queueing system for click & collect when stores are busy."
                                data-placement="left"
                        }}
                    </div>
                    <button class="btn btn-primary btn_full stock__find_btn">
                        <span class="btn__text">Find Stores</span>
                    </button>
                    <div class="stock__cancel">
                        <a href="#" class="stock__cancel-text">
                            Cancel
                        </a>
                    </div>
                </div>
                <div class="stock__result stock__result_hide">
                    <div class="stock__search">
                        <div class="stock__res">
                            <div class="stock__arg">
                                <div class="stock__amount">
                                    <span class="stock__amount-title">Quantity:</span>
                                    <span class="stock__amount-val"></span>
                                </div>
                                <div class="stock__cost">
                                    £<span class="stock__cost-val">149.99</span>
                                </div>
                            </div>
                            <div class="stock__descr">
                                Stores
                                with
                                <span class="stock__descr_both">both</span>
                                <span class="stock__descr_stock">stock</span>
                                <span class="stock__descr_both">and</span>
                                <span class="stock__descr_c-and-c">Click & Collect</span>
                                near
                                <span class="stock__descr_post">WD23 3DS</span>.
                            </div>
                        </div>
                        <div class="stock__edit">
                            <button class="btn btn-primary stock__edit_btn">
                                <span class="btn__text">
                                   <i class="far fa-pencil"></i>
                                    Edit Search
                                </span>
                            </button>
                        </div>
                    </div>
                    <div class="stock__list">
                        {{#each bigWins.stores}}
                            <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
                                        defStore=true
                                        makeDefault=true
                                }}
                                <p class="stock__valid">
                                    We’re sorry Click & Collect is temporarily unavailable at this store.
                                    Please choose another store.
                                </p>
                            </div>

                        {{/each}}
                        <button class="btn btn-action btn_full bw__cc-btn {{#if nearest-purchase}}nearest-store-purchasable{{/if}}">
                            <span class="btn__text">Click & Collect</span>
                        </button>
                        {{> stock-reserve class="stock__reserve"}}
                    </div>
                </div>

            </div>
        </div>
    </div>
    {{#each bigWins.stores}}
        {{> store-details
                distance = distance
                distanceUom = distanceUom
                name = name
                phone = phone
                postcode = postcode
        }}
    {{/each}}
</div>
