<?php

namespace App\Components\Report;

use App\Models\Claim\Status;
use Livewire\Component;

class StatusReport extends Component {
    public function getStatusCountsProperty() {
        return Status::withCount('claims')
            ->get(['id', 'display_name'])
            ->keyBy('id')
            ->toArray();
    }

    public function render() {
        return view('components.report.status-report', [
            'statusCounts' => $this->statusCounts,
        ]);
    }
}
