<?php
use Livewire\Component;
?>

<li class="mini-cart"><a href="#"><i class="flaticon-shopping-cart"></i> <span class="mini-cart-total">{{ symbol($total) }}({{ $count }})</span></a>
    <!--Mini Cart Dropdown Start-->
    <div class="header-cart">
        <ul class="cart-items">
            @foreach($carts as $cart)
                <li class="single-cart-item">
                    <div class="cart-img">
                        <a href="{{ $cart->product->url }}"><img src="{{ $cart->product->okpcode }}" alt="{{ ucfirst($cart->product->locale) }} {{ $cart->product->jianjie2 }} - ({{ $cart->product->jianjie1 }})"></a>
                    </div>
                    <div class="cart-content">
                        <h5><a href="{{ $cart->product->url }}">
                            @if ($cart->product->category === 'battery')
                                    Batería {{ $cart->product->jianjie2 }} {{ $cart->product->dl }} - ({{ $cart->product->jianjie1 }})
                                    @else
                                    Cargador {{ $cart->product->jianjie2 }} {{ $cart->product->bzq }} - ({{ $cart->product->jianjie1 }})
                                    @endif
                        </a></h5>
                        <span class="product-quantity">{{ $cart->numbers }} ×</span>
                        <span class="product-price">{{ $cart->singletotal }} €</span>
                    </div>

                </li>
            @endforeach
        </ul>
        <div class="cart-total">
            <h5>Subtotal :<span class="float-right">{{ symbol($subtotal) }}</span></h5>
            <h5>Impuestos :<span class="float-right">{{ symbol($tax) }}</span></h5>
            <h5>Envío :<span class="float-right">Gratis</span></h5>
            <h5>Total (impuestos inc.) : <span class="float-right">{{ symbol($total) }}</span></h5>
        </div>
        <div class="cart-btn">
            <a href="{{ url('carts') }}">Ir al carrito</a>
        </div>
    </div>
    <!--Mini Cart Dropdown End-->
</li>