@if(count($orders))
    <div class="table-responsive">
        <table class="table ">
            <thead>
            <tr>
                <th> {{__('web.order_id')}}  </th>
                <th> {{__('web.order_date')}}  </th>
                <th> {{__('web.order_products')}}   </th>
                <th>{{__('web.order_total')}} </th>
                <th>{{__('web.order_status')}} </th>
                <th></th>
            </tr>
            </thead>
            <tbody>
            @foreach($orders as $row)
                <tr>
                    <td> #{{$row->id}} </td>
                    <td>  {{$row->date}}  </td>
                    <td> {{$row->products->count()}} {{__('web.product')}} </td>
                    <td><b>{{$row->total}} {{__('web.sar')}} </b></td>
                    <td> <span class="badge {{__('orders.statuses_cards.'.$row->status)}}">{{__('orders.statuses.'.$row->status)}}   </span> </td>
                    <td>
                        <a href="{{route('web.order.details',$row->id)}}" class="primary_border_butn butn sm_butn rounded-circle ">
                            <i class="fa-regular fa-info mx-0"></i>
                        </a>
                    </td>
                </tr>
            @endforeach
            </tbody>
        </table>
    </div>
@else
    @include('web.pages.components.not_found',['message'=>__('web.not_found_orders')])
@endif
