<?php

namespace Modules\Facturation\Providers;

use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
use Modules\Facturation\Events\FactureCreated;
use Modules\Facturation\Events\FacturePaid;
use Modules\Facturation\Events\FactureSent;
use Modules\Facturation\Listeners\NotifyFactureCreated;
use Modules\Facturation\Listeners\NotifyFacturePaid;
use Modules\Facturation\Listeners\NotifyFactureSent;

class EventServiceProvider extends ServiceProvider
{
    /**
     * The event handler mappings for the application.
     *
     * @var array<string, array<int, string>>
     */
    protected $listen = [
        FactureCreated::class => [
            NotifyFactureCreated::class,
        ],
        FactureSent::class => [
            NotifyFactureSent::class,
        ],
        FacturePaid::class => [
            NotifyFacturePaid::class,
        ],
    ];

    /**
     * Indicates if events should be discovered.
     *
     * @var bool
     */
    protected static $shouldDiscoverEvents = true;

    /**
     * Configure the proper event listeners for email verification.
     */
    protected function configureEmailVerification(): void {}
}
