<?php

declare(strict_types=1);

namespace App\Providers;

use App\Composers\LatestSuggestedInformationComposer;
use App\Http\View\Composers\UserNotificationComposer;
use App\View\Components\Badge;
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\Facades\View;
use Illuminate\Support\ServiceProvider;

/**
 * Class ViewServiceProvider
 */
final class ViewServiceProvider extends ServiceProvider
{
    public function boot(): void
    {
        Blade::component(Badge::class, 'badge');
    }

    public function register(): void
    {
        $this->registerComposers();
    }

    public function registerComposers(): void
    {
        View::composer('partials.navbar', UserNotificationComposer::class);
        View::composer('pages.plocha', LatestSuggestedInformationComposer::class);
    }
}
