<?php

namespace App\Providers;

use App\Events\Backend\ContactCreated;
use App\Listeners\Backend\NotifyAfterContactCreated;
use App\Models\ProductManagement\Category;
use App\Models\SettingManagement\Contact;
use App\Models\SecurityManagement\Role;
use App\Models\SettingManagement\Image;
use App\Models\OrderManagement\Order;
use App\Models\OrderManagement\OrderProduct;
use App\Models\PaymentManagement\Payment;
use App\Models\Polymorphs\Media;
use App\Models\ProductManagement\Product;
use App\Models\UserManagement\User;
use App\Observers\CategoryObserver;
use App\Observers\ContactObserver;
use App\Observers\ImageObserver;
use App\Observers\MediaObserver;
use App\Observers\OrderObserver;
use App\Observers\OrderProductObserver;
use App\Observers\PaymentObserver;
use App\Observers\ProductObserver;
use App\Observers\RoleObserver;
use App\Observers\UserObserver;
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 listener mappings for the application.
     *
     * @var array
     */
    protected $listen = [
        Registered::class => [
            SendEmailVerificationNotification::class,
        ],

        ContactCreated::class => [NotifyAfterContactCreated::class]
    ];

    protected $observers = [
       // Role::class => [RoleObserver::class],
        OrderProduct::class => [OrderProductObserver::class],
        Order::class => [OrderObserver::class],
        Contact::class => [ContactObserver::class],
        User::class => [UserObserver::class],
        Payment::class => PaymentObserver::class,
        Image::class => ImageObserver::class,
        Media::class => MediaObserver::class,
        Product::class => ProductObserver::class,
        Category::class => CategoryObserver::class,
    ];

    /**
     * Register any events for your application.
     *
     * @return void
     */
    public function boot(){
        parent::boot();
    }
}
