<?php

namespace App\Notifications;

use App\Models\Announcement;

class AnnouncementPublishedNotification extends HrmsNotification
{
    public function __construct(
        protected Announcement $announcement
    ) {}

    public function notificationCategory(): string
    {
        return 'announcements';
    }

    public function notificationSubject(): string
    {
        return 'New announcement: ' . $this->announcement->title;
    }

    public function notificationLines(): array
    {
        return [
            'A new company announcement has been published.',
            'Title: ' . $this->announcement->title,
        ];
    }

    public function actionUrl(): ?string
    {
        return route('announcements.index');
    }

    public function actionLabel(): string
    {
        return 'View announcements';
    }
}
