<?php

namespace App\Support;

use App\Models\Feed;
use App\Models\RouteArticle;
use Illuminate\Database\Eloquent\Collection;

class PendingFeedGroup
{
    /**
     * @param  Collection<int, RouteArticle>|null  $routeArticles
     */
    public function __construct(
        public readonly Feed $feed,
        public readonly int $count,
        public readonly ?Collection $routeArticles,
    ) {}

    public function isExpanded(): bool
    {
        return $this->routeArticles !== null;
    }
}
