<div class="col-md-5 ml-auto">
    <div class="cart-page-total pt-0">
        @if($cartTotal != 0)
        <h2>{{__("Cart totals")}}</h2>
        <ul>
            <li>{{__("Subtotal")}}<span>{{ format_amount($cartSubTotal,true) }}</span></li>
            @if(session()->has('coupon'))
                <li>
                    {{__("Discount")}}
                    <small>({{ getNumbersOfCart()->get('discountCode') }})</small>
                    <span>{{ format_amount($cartDiscount,true) }}</span>
                </li>
            @endif
            @if(session()->has('shipping'))
                <li>
                    {{__("Shipping")}}
                    <small>({{ getNumbersOfCart()->get('shippingCode') }})</small>
                    <span>{{ format_amount($cartShipping,true) }}</span>
                </li>
            @endif
            <li>({{ __("Tax :percent %",['percent' => config('cart.tax')])  }})<span>{{ format_amount($cartTax,true) }}</span></li>
            <li>{{__("Total")}}<span>{{ format_amount($cartTotal,true) }}</span></li>
        </ul>
        <div class="coupon-all">
            <div class="coupon">
                @if(!session()->has('coupon'))
                    <form wire:submit.prevent="applyDiscount()">
                        <p class="checkout-coupon">
                            <input wire:model="couponCode" type="text" placeholder="{{__("Coupon code")}}" required/>
                            <button type="submit" class="btn btn-default">
                                {{__("Apply Coupon")}}
                            </button>
                        </p>
                    </form>
                @endif
                @if(session()->has('coupon'))
                    <button type="button" class="btn btn-default"  wire:click.prevent="removeCoupon()" >
                        {{__("Remove coupon")}}
                    </button>
                @endif
            </div>
        </div>
        @endif
    </div>
</div>
