@if(!empty($chats))
    @foreach($chats as $chat)
        <li class="mui-table-view-cell mui-media">
            <div class="mui-slider-right mui-disabled">
                <a class="mui-btn mui-btn-red mui-icon mui-icon-trash" href="javascript:;" data-delete="/member/message_chat_delete/{{$chat['id']}}"></a>
            </div>
            <a class="mui-slider-handle" target="_parent" style="color:#333;display:block;" href="/member/message_chat_room/{{$chat['id']}}">
                <img style="width:42px;height:42px;border-radius:3px;" class="mui-media-object mui-pull-left" src="{{\TechSoft\Laravel\Assets\AssetsUtil::fixOrDefault($chat['_chatMemberUser']['avatar'],'assets/lib/img/avatar.png')}}" />
                <div class="mui-media-body">
                    {{$chat['_chatMemberUser']['username']}}
                    <p class="mui-ellipsis">
                        @if($chat['_lastMsg'])
                            @if($chat['unreadMsgCount'])
                                <span class="uk-text-danger">{{$chat['unreadMsgCount']}}条未读</span>
                                ·
                            @endif
                            <time datetime="{{$chat['_lastMsg']['created_at']}}"></time>
                            ·
                            @if($chat['_lastMsg']['senderMemberUserId']==$_memberUserId)
                                我
                            @else
                                {{$chat['_chatMemberUser']['username']}}
                            @endif
                            说
                            {{\TechSoft\Laravel\MemberChat\MemberChatUtil::summary($chat['_lastMsg'])}}
                        @endif
                    </p>
                </div>
            </a>
        </li>
    @endforeach
@endif