<?php

namespace App\Services;

use App\Models\TopbarNotification;
use Illuminate\Database\Eloquent\Collection;

class TopbarNotificationService
{
    /**
     * Get all active, ordered topbar notifications for display in the ticker.
     * Applies the active() scope (is_active=true AND not expired) and ordered() scope.
     *
     * Requirements: 1.2, 1.3, 1.4, 1.5
     */
    public function getActive(): Collection
    {
        return TopbarNotification::active()->ordered()->get();
    }
}
