@extends('layouts.app')
@section('title', __('WhatsApp').' — '.$patient->full_name)
@section('content')
@forelse($messages as $m)
{{ $m->body }}
@if($m->hasMedia())
📎 {{ $m->media_filename }}
@endif
{{ $m->created_at->setTimezone(\App\Support\ClinicTime::timezone())->format('d M · H:i') }}
· {{ $m->status->label() }}
@if($m->status === \App\Enums\WaMessageStatus::Failed)
@can('retry', $m)
@endcan
@endif
@empty
{{ __('No messages yet.') }}
@endforelse
@if($patient->whatsapp_opt_in)
@can('create', App\Models\WaMessage::class)
@endcan
@else
{{ __('This patient has opted out of WhatsApp messages.') }}
@endif
@endsection