@if (isset($shopping_mode) && $shopping_mode === 'test')
    <strong>#### TEST MODE #### TEST MODE ####</strong>
@endif
<div class="checkout-order mt-4">
    @if(Yard::instance('shopping')->isWithPayments())
    <h3 class="">Zahlungsart auswählen</h3>
    <div id="error-payment_method"></div>
    <div class="table-responsive mb-4">
        <table class="table table-payment m-0" id="">
            <tbody class="switchers-stacked">
                @if (true || \App\Models\PaymentMethod::isShowPaymentMethod('PP', $user_payment_methods, 0))
                    <tr>
                        <td class="align-middle px-0 pl-1p">
                            <label class="switcher switcher-success">
                                {!! Form::radio('payment_method', 'pp', '', ['class' => 'switcher-input', 'data-error'=>'#error-payment_method', 'required' => true]) !!}
                                <span class="switcher-indicator">
                                    <span class="switcher-yes">
                                        <span class="ion ion-md-checkmark"></span>
                                    </span>
                                    <span class="switcher-no"></span>
                                </span>
                                <span class="switcher-label font-weight-bold text-left">PayPal</span>
                            </label>
                        </td>
                        <td class="text-right align-middle px-0 py-3 ui-w-100">
                            <img class="float-right" width="90"
                                src="{{ asset('images/payments-assets/paypal.png') }}" alt="PayPal">
                        </td>
                    </tr>

                @endif
              {{--   
                @if (true || \App\Models\PaymentMethod::isShowPaymentMethod('SB', $user_payment_methods, 0))
                    <tr>
                        <td class="align-middle px-0 pl-1p">
                            <label class="switcher switcher-success">
                                {!! Form::radio('payment_method', 'sb', '', ['class' => 'switcher-input', 'data-error'=>'#error-payment_method', 'required' => true]) !!}
                                <span class="switcher-indicator">
                                    <span class="switcher-yes">
                                        <span class="ion ion-md-checkmark"></span>
                                    </span>
                                    <span class="switcher-no"></span>
                                </span>
                                <span class="switcher-label font-weight-bold text-left">Sofort
                                    Überweisung</span>
                            </label>
                        </td>
                        <td class="text-right align-middle px-0 py-3 ui-w-100">
                            <img class="float-right" width="90"
                                src="{{ asset('images/payments-assets/sofort.png') }}" alt="Sofort">
                        </td>
                    </tr>
                @endif
                @if (true || \App\Models\PaymentMethod::isShowPaymentMethod('CC', $user_payment_methods, 0))
                    <tr>
                        <td class="align-middle px-0 pl-1p">
                            <label class="switcher switcher-success">
                                {!! Form::radio('payment_method', 'cc', '', ['class' => 'switcher-input', 'data-error'=>'#error-payment_method', 'required' => true]) !!}
                                <span class="switcher-indicator">
                                    <span class="switcher-yes">
                                        <span class="ion ion-md-checkmark"></span>
                                    </span>
                                    <span class="switcher-no"></span>
                                </span>
                                <span class="switcher-label font-weight-bold text-left">Kreditkarte</span>
                            </label>
                        </td>
                        <td class="text-right align-middle px-0 py-3 ui-w-100">
                            <img class="float-right" width="90"
                                src="{{ asset('images/payments-assets/creditcard.png') }}" alt="Mastercard + Visa">
                        </td>
                    </tr>
                @endif
                 --}}
                @if (true || \App\Models\PaymentMethod::isShowPaymentMethod('VOR', $user_payment_methods, 0))
                    <tr>
                        <td class="align-middle px-0 pl-1p">
                            <label class="switcher switcher-success">
                                {!! Form::radio('payment_method', 'vor', '', ['class' => 'switcher-input', 'data-error'=>'#error-payment_method', 'required' => true]) !!}
                                <span class="switcher-indicator">
                                    <span class="switcher-yes">
                                        <span class="ion ion-md-checkmark"></span>
                                    </span>
                                    <span class="switcher-no"></span>
                                </span>
                                <span class="switcher-label font-weight-bold text-left">Vorkasse</span>
                            </label>
                        </td>
                        <td class="text-right align-middle px-0 py-3 ui-w-100">
                            <img class="float-right" width="90" src="{{ asset('images/payments-assets/vor.png') }}"
                                alt="Vorkasse">
                        </td>
                    </tr>
                @endif
            </tbody>
        </table>
    </div>
    @endif
    <h3 class="">Warenkorb</h3>
    <div class="checkout-cart">
        <div class="mb-2">
            <span class="float-right">{{ Yard::instance('shopping')->total() }} €</span>
            <strong class="">Zwischensumme:</strong>
        </div>
        <hr class="light">
        <div class="mb-2">
            <span class="float-right">{{  Yard::instance('shopping')->shipping() }} €</span>
            <span class="">Versandkosten:</span>
        </div>
        <div class="mb-2">
            <span class="float-right">{{  Yard::instance('shopping')->getShippingCountryName() }}</span>
            <span class="">Lieferland:</span>
        </div>
        <hr class="light">
        <div class="mb-2" style="font-size: 90%">
            <span class="float-right">{{  Yard::instance('shopping')->subtotalWithShipping() }} €</span>
            <span class="">Summe ohne MwSt:</span>
        </div>
        <div class="mb-2" style="font-size: 90%">
            <span class="float-right">{{  Yard::instance('shopping')->taxWithShipping() }} €</span>
            <span class=""> zzgl. {{-- Yard::getTaxRate() --}} MwSt:</span>
        </div>
        <hr class="light">
        <div class="">
            <span class="float-right"><strong>{{ Yard::instance('shopping')->totalWithShipping() }} €</strong></span>
            <strong class="">Gesamtsumme:</strong>
        </div>
        <hr class="light">
        <div class="form-group">
            <label class="switcher switcher-success">
                {!! Form::checkbox('accepted_data', 1, '', ['id' => 'accepted_data', 'class' => 'switcher-input', 'data-error'=>'#error-accepted_data',  'required' => true]) !!}
                <span class="switcher-indicator">
                    <span class="switcher-yes">
                        <span class="ion ion-md-checkmark"></span>
                    </span>
                    <span class="switcher-no">
                    </span>
                </span>
                <span class="switcher-label">Mit Klick auf "Jetzt kaufen" akzeptiere ich die
                    <a href="https://www.gruene-seele.bio/agb/" target="_blank" class="text-secondary">Allgemeinen
                        Geschäftsbedingungen</a> und die
                    <a href="https://www.gruene-seele.bio/datenschutzerklaerung/" target="_bank"
                        class="text-secondary">Datenschutzbelehrung</a>, damit für die Bestellung
                    meine Daten verarbeitet werden können. <span class="required">*</span>
            </label>
            <div id="error-accepted_data"></div>

        </div>
        {!! Form::hidden("action", "submit-order") !!}
        <button type="submit" class="btn btn-primary btn-lg btn-block mt-4 button-prevent-multiple-submits">
            <i class="ion ion-ios-share-alt"></i> Jetzt kaufen <i class="spinner fa fa-spinner fa-spin"></i> 
        </button>
        <hr class="light">
        @if(Yard::instance('shopping')->isWithPayments())
            <p class="text-center" style="line-height: 1.2em;"><em class="small text-center"> <i
                        class="fa fa-lock"></i> Sind alle Deine Angaben vollständig ausgefüllt,
                    klicke auf "Jetzt kaufen" und Du wirst zu unserer Zahlung/Zahlungsabieter weitergeleitet,
                    die Verbindungen sind SSL verschlüsselt.</em></p>
       @else
            <p class="text-center" style="line-height: 1.2em;"><em class="small text-center"> <i
                class="fa fa-lock"></i> Sind alle Deine Angaben vollständig ausgefüllt,
                    klicke auf "Jetzt kaufen" und die Bestellung wird abgeschlossen,
                    die Verbindungen sind SSL verschlüsselt.</em></p>
       @endif
    </div>

</div>
