<?php

namespace App\Http\Controllers\Tenant;

use App\Domain\Clinical\TimelineService;
use App\Http\Controllers\Controller;
use App\Models\Patient;

class TimelineController extends Controller
{
    public function show(Patient $patient, TimelineService $timeline)
    {
        $this->authorize('view', $patient);

        return view('patients.timeline', [
            'patient' => $patient,
            'events' => $timeline->for($patient),
        ]);
    }
}
