<div id="mcp-phone-calls-memos">
@if(!$mcpClientMemos || !count($mcpClientMemos))
<div class="p-2">No memos</div>
@else
	<table class="table table-sm table-striped m-0">
		<tbody>
			@foreach($mcpClientMemos as $memo)
			<tr discardable-container>
				<td class="px-1">
					<a href="{{route('patients.view.dashboard', $memo->client_uid)}}">
						{{$memo->name_first}} {{$memo->name_last}}
					</a>
					<a class="text-sm text-nowrap d-block"
					   href="/memos-thread/{{$memo->client_uid}}"
					   native target="_blank"
					   open-in-stag-popup
					   popup-style="tall"
					   title="Memos for {{$memo->name_first}} {{$memo->name_last}}">
						{{friendlier_date_time($memo->created_at)}}
					</a>
				</td>
				<td class="px-1 w-75 text-left">
					{{$memo->content}}
				</td>
				<td class="width-70px px-2 text-right">
					<div class="ml-auto">
						<form url="/api/clientMemo/stamp" target="#mcp-phone-calls-memos" discardable>
							<input type="hidden" name="uid" value="{{$memo->uid}}">
							<button submit class="bg-transparent border-0 p-0 text-primary">Ack.</button>
						</form>
					</div>
				</td>
			</tr>
			@endforeach
		</tbody>
	</table>
	@if($mcpClientMemosCount > 10)
		<div class="p-2 border-top bg-light text-center">
			Showing 1 to 10 of {{$mcpClientMemosCount}} unstamped memos
		</div>
	@endif
@endif
</div>
