@props([

 'col'
])


<div class="col-xl-{{ $col ? $col : '6' }}">
    <div class="card card-height-100">
        <div class="card-header align-items-center d-flex">
            <h4 class="card-title mb-0 flex-grow-1">{{ __('models.company_orders') }}</h4>
            <div class="flex-shrink-0">
                <div class="dropdown card-header-dropdown">
                    <a class="text-reset dropdown-btn" href="#" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                        <span class="text-muted fs-16"><i class="mdi mdi-dots-vertical align-middle"></i></span>
                    </a>

                </div>
            </div>
        </div><!-- end card header -->
        <div class="card-body">
            <div class="table-responsive table-card">


                <table class="table align-middle table-borderless table-centered table-nowrap mb-0">
                        <thead class="text-muted table-light">
                            <tr>
                                <th scope="col" style="width: 62;">{{ __('models.name') }}</th>
                                <th scope="col">{{ __('models.phone') }}</th>
                                <th scope="col">{{ __('models.owner') }}</th>
                                <th scope="col">{{ __('models.orders') }}</th>
                            </tr>
                        </thead>
                        <tbody>

                        @if ($company_orders->count() > 0)
                            @foreach ( $company_orders as $company)

                                <tr>

                                    <td>{{ $company->name }}</td>
                                    <td>{{ $company->phone }}</td>
                                    <td>{{ $company->owner }}</td>
                                    <td>{{ $company->orders_count }}</td>
                                </tr>

                            @endforeach

                        @endif

                        </tbody><!-- end tbody -->

                    </table>



            </div><!-- end -->
        </div><!-- end cardbody -->
    </div>
</div>
