<tr x-data="{ show: true }" x-show="show">
    <td class="product-thumbnail">
        <a href="{{ route('product.show', $cartItem->model->slug) }}">
            <img src="{{ $cartItem->model->image }}" alt="{{ $cartItem->model->name }}" width="70"/>
        </a>
    </td>
    <td class="product-name">
        <a href="#">{{ $cartItem->model->name }}</a>
    </td>
    <td class="product-price-cart">
        <span class="amount" style="font-size: 14px;">{{ format_amount($cartItem->model->price,true) }}</span>
    </td>
    <td class="product-quantity" style="font-size: 14px;">
        <div class="d-flex align-items-center justify-content-between">
            <span class="text-uppercase text-gray headings-font-family"></span>
            <a wire:click.prevent="decreaseQuantity('{{ $cartItem->rowId }}')" style="cursor: pointer;">
                <i class="fas fa-caret-left"></i>
            </a>

            <input wire:input="increaseQuantity('{{ $cartItem->rowId }}', '{{ $cartItem->id }}',$event.target.value)"
                   class=" text-center"
                   type="number"
                   min="1"
                   value="{{$itemQuantity}}">
            <a wire:click.prevent="increaseQuantity('{{ $cartItem->rowId }}', '{{ $cartItem->id }}')" style="cursor: pointer;">
                <i class="fas fa-caret-right"></i>
            </a>
        </div>
    </td>
    <td>
        <p class="mb-0">{{ format_amount($cartItem->model->price  * ($cartItem->qty),true) }}</p>
    </td>
    <td>
        <a wire:click.prevent="removeFromCart('{{ $cartItem->rowId }}')"
           x-on:click="show = false"
           style="cursor: pointer;">
            <i class="fas fa-trash-alt text-muted"></i>
        </a>
    </td>
</tr>




