@php 
$clientSmses = $performer->pro->clientSmsesAsDna();
@endphp 

@if(!$clientSmses || !count($clientSmses))
    <div class="px-2 py-3">No messages</div>
@else
    <table class="table table-sm m-0">
        <tbody>
        @foreach($clientSmses as $msg)
            <tr>
                <td class="px-1">
                    <a href="{{route('patients.view.sms', $msg->client->uid)}}">
                        {{$msg->client->name_first}} {{$msg->client->name_last}}
                    </a>
                    <a class="text-sm text-nowrap d-block"
                       href="/messages-thread/{{$msg->client->uid}}"
                       native target="_blank"
                       open-in-stag-popup
                       popup-style="tall"
                       title="Messages for {{$msg->client->name_first}} {{$msg->client->name_last}}">
                        {{friendlier_date_time($msg->created_at)}}
                    </a>
                </td>
                <td class="px-1 w-75 text-left">
                    {{$msg->body}}
                </td>
               
            </tr>
        @endforeach
        </tbody>
    </table>
    <div class="p-2 border-top bg-light text-center">
        {{$clientSmses->links()}}
    </div>
@endif
