<div>
    <div class="card">
        <div class="card-body">
            <table class="table table-condensed">
                <thead>
                    <tr>
                        <th>Client Name</th>
                        <th>Status</th>
                        <th>Link</th>
                        <th>Tags</th>
                        <th>Actions</th>
                    </tr>
                </thead>
                <tbody>
                    @foreach($clients as $item)
                        <tr>
                            <td>
                                <b>{{ $item['claim']->client?->fullName }}</b>
                            </td>
                            <td>
                                {{ $item['claim']->status->display_name }}
                            </td>
                            <td>
                                @if($item['via'] === 'care_setting' || $item['via'] === 'both')
                                    <span class="badge bg-secondary">Care Setting</span>
                                @endif
                                @if($item['via'] === 'direct' || $item['via'] === 'both')
                                    <span class="badge bg-primary">Direct</span>
                                @endif
                            </td>
                            <td class="d-none d-lg-table-cell">
                                <x-tag-list :model="$item['claim']"/>
                            </td>
                            <td>
                                @can('view', $item['claim']->client)
                                    <a wire:navigate href="{{ route('clients.show', $item['claim']->client) }}"
                                       class="btn btn-md">
                                        <span class="mdi mdi-shield-search text-primary"></span>
                                    </a>
                                @endcan
                            </td>
                        </tr>
                    @endforeach
                </tbody>
            </table>
        </div>
    </div>
    {{-- Be like water. --}}
</div>
