<?php

declare(strict_types=1);

namespace App\Providers;

use App\Repositories\QzCertificate\QzCertificateRepositoryInterface;
use App\Repositories\QzCertificate\QzCertificateRepository;
use App\Repositories\QzTrayLog\QzTrayLogRepositoryInterface;
use App\Repositories\QzTrayLog\QzTrayLogRepository;
use App\Listeners\QzTray\LogQzTrayActivity;
use Illuminate\Support\ServiceProvider;

class QzTrayServiceProvider extends ServiceProvider
{
    /**
     * Register any application services.
     */
    public function register(): void
    {
        $this->app->bind(QzCertificateRepositoryInterface::class, QzCertificateRepository::class);
        $this->app->bind(QzTrayLogRepositoryInterface::class, QzTrayLogRepository::class);
    }

    /**
     * Bootstrap any application services.
     */
    public function boot(): void
    {
        // Register the QZ Tray Event Subscriber
        $this->app['events']->subscribe(LogQzTrayActivity::class);
    }
}
