{{#if errors}}
    {{lang 'errors.shipping_quote_failure'}}
    <ul>
        {{#each errors}}
            <li>{{this}}</li>
        {{/each}}
    </ul>
{{else}}
    <form>
        {{#if quotes.shipping_methods}}
            <div class="estimator-form--default">
                <ul>
                {{#each quotes.shipping_methods}}
                    <li class="estimator-form-row">
                        <dl>
                            <dt class="estimator-form-label">
                                <input id="shipping-quote-{{type}}-{{id}}" class="shipping-quote" type="radio" name="shipping_method" value="{{id}}">
                                <label class="estimator-form-label-text" for="shipping-quote-{{type}}-{{id}}">
                                    {{provider_name}}
                                </label>
                            </dt>
                            <dd class="estimator-form-input estimator-form-input--price">
                                <label for="shipping-quote-{{type}}-{{id}}">
                                    <span class="{{#if cost_after_discount}}price--discounted{{/if}}"><b>{{cost.formatted}}</b></span>
                                    {{#if cost_after_discount}} <span><b>{{cost_after_discount.formatted}}</b></span>{{/if}}
                                </label>
                            </dd>
                        </dl>
                    </li>
                {{/each}}
                </ul>
                {{#if quotes.ups_shipping_methods}}
                    <a class="estimator-form-toggleUPSRate" href="#">{{lang 'cart.shipping_estimator.show_ups_rates'}}</a>
                {{/if}}
            </div>
        {{/if}}
        {{#if quotes.ups_shipping_methods}}
            <div {{#if quotes.shipping_methods}}class="estimator-form--ups u-hiddenVisually"{{/if}}>
                <ul>
                {{#each quotes.ups_shipping_methods}}
                    <li class="estimator-form-row">
                        <dl>
                            <dt class="estimator-form-label">
                                <input id="shipping-quote-{{type}}-{{id}}" class="shipping-quote" type="radio" name="shipping_method" value="{{id}}">
                                <label class="estimator-form-label-text" for="shipping-quote-{{type}}-{{id}}">
                                    {{#if logo_path}}
                                        <img class="lazyload" data-sizes="auto" src="{{cdn 'img/loading.svg'}}" data-src="{{logo_path}}" alt="{{description}}" title="{{description}}">
                                    {{/if}}
                                    {{provider_name}} &mdash; {{description}}
                                </label>
                            </dt>
                            <dd class="estimator-form-input estimator-form-input--price">
                                <label for="shipping-quote-{{type}}-{{id}}">
                                    <span class="{{#if cost_after_discount}}price--discounted{{/if}}"><b>{{cost.formatted}}</b></span>
                                    {{#if cost_after_discount}} <span><b>{{cost_after_discount.formatted}}</b></span>{{/if}}
                                </label>
                            </dd>
                        </dl>
                    </li>
                {{/each}}
                </ul>
                {{#if quotes.shipping_methods}}
                    <a class="estimator-form-toggleUPSRate" href="#">{{lang 'cart.shipping_estimator.hide_ups_rates'}}</a>
                {{/if}}
            </div>
        {{/if}}
        <input class="button button--small button--primary select-shipping-quote" type="submit" value="{{lang 'cart.checkout.update'}}">
    </form>
{{/if}}
