<?php

namespace App\Providers;

use App\Listeners\MemberMessageListener;
use App\Listeners\PayListener;
use Edwin404\Common\Support\BladeEnhanceTrait;
use Edwin404\Tecmz\Traits\AssetsCDNTrait;
use Edwin404\Tecmz\Traits\PayConfigTrait;
use Illuminate\Events\Dispatcher;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
{
    use AssetsCDNTrait;
    use PayConfigTrait;
    use BladeEnhanceTrait;

    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot(Dispatcher $events)
    {
        if (env('APP_DEBUG', false)) {
            //$this->app->register(\Barryvdh\Debugbar\ServiceProvider::class);
        }

        $events->subscribe(PayListener::class);

        $this->bootAssetsCDN();
        $this->bootPayConfig();
        $this->bootBladeEnhance();

    }

    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {

    }
}
