<?php

declare(strict_types=1);

namespace App\Http\Livewire\Components\Notifications;

use Illuminate\Contracts\View\View;

/**
 * Class Counter
 *
 * @package App\Http\Livewire\Components\Notifications
 */
final class Counter extends Simple
{
    /**
     * @var int
     */
    public int $unreadNotificationsCount = 0;

    /**
     * @return \Illuminate\Contracts\View\View
     */
    public function render(): View
    {
        $this->unreadNotificationsCount = $this->userNotifications->count();

        return view('livewire.components.notifications.counter');
    }
}
