<?php

namespace App\Notifications;

use App\Models\PerformanceReview;

class PerformanceReviewDueNotification extends HrmsNotification
{
    public function __construct(
        protected PerformanceReview $review
    ) {}

    public function notificationCategory(): string
    {
        return 'performance';
    }

    public function notificationSubject(): string
    {
        return 'Performance review due';
    }

    public function notificationLines(): array
    {
        return [
            'You have a pending performance review.',
            'Employee: ' . ($this->review->user?->name ?? '—'),
            'Cycle: ' . ($this->review->performanceCycle?->name ?? '—'),
        ];
    }

    public function actionUrl(): ?string
    {
        return route('performance-reviews.index');
    }

    public function actionLabel(): string
    {
        return 'Open reviews';
    }
}
