@extends('layouts.app')
@section('title', __('Timeline').' — '.$patient->full_name)

@section('content')
<h1 class="h4 fw-bold mb-2">🕘 {{ $patient->full_name }}</h1>
@include('patients._tabs')

<div class="mb-card p-4" style="max-width:46rem">
    @if($events->isEmpty())
        <p class="mb-muted mb-0">{{ __('No activity yet.') }}</p>
    @else
    <div class="tl">
        @foreach($events as $e)
            <div class="tl-item">
                <div class="d-flex justify-content-between gap-2">
                    <strong>{{ $e['icon'] }} {{ $e['title'] }}</strong>
                    <span class="mb-muted small text-nowrap">{{ $e['at_human'] }}</span>
                </div>
                <div class="mb-muted small">{{ $e['detail'] }}</div>
                <div class="mb-muted small">{{ $e['at_local'] }} · <a href="{{ $e['url'] }}">{{ __('Open') }}</a></div>
            </div>
        @endforeach
    </div>
    @endif
</div>
@endsection
