<?php

namespace App\Providers;

use App\Models\Area;
use App\Models\Banner;
use App\Models\Cart;
use App\Models\Category;
use App\Models\Order;
use App\Models\Product;
use App\Models\User;
use App\Models\Userdata;
use App\Models\Wishlist;
use App\Observers\AreaObserver;
use App\Observers\BannerObserver;
use App\Observers\CartObserver;
use App\Observers\categoryObserver;
use App\Observers\OrderdataObserver;
use App\Observers\ProductObserver;
use App\Observers\UserdataObserver;
use App\Observers\userObserver;
use App\Observers\WishlistdataObserver;
use Illuminate\Auth\Events\Registered;
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Event;

class EventServiceProvider extends ServiceProvider
{
    /**
     * The event to listener mappings for the application.
     *
     * @var array<class-string, array<int, class-string>>
     */
    protected $listen = [
        Registered::class => [
            SendEmailVerificationNotification::class,
        ],
    ];

    /**
     * Register any events for your application.
     */
    public function boot(): void
    {
        User::observe(userObserver::class);
        Category::observe(categoryObserver::class);
        Product::observe(ProductObserver::class);
        Cart::observe(CartObserver::class);
        Userdata::observe(UserdataObserver::class);
        Order::observe(OrderdataObserver::class);
        Wishlist::observe(WishlistdataObserver::class);
        Banner::observe(BannerObserver::class);
        Area::observe(AreaObserver::class);
        
    }

    /**
     * Determine if events and listeners should be automatically discovered.
     */
    public function shouldDiscoverEvents(): bool
    {
        return false;
    }
}
