<?php namespace TPS\Admin\Providers;

use Illuminate\Routing\Router;
use Illuminate\Support\ServiceProvider;

class AdminServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap services.
     *
     * @return void
     */
    public function boot(Router $router)
    {
        $this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'admin');
        $this->loadRoutesFrom(__DIR__ . '/../Routes/web.php');

        $this->publishes([
            __DIR__ . '/../Resources/views/settings' => resource_path('views/vendor/admin/settings'),
            __DIR__ . '/../Resources/views/sales' => resource_path('views/vendor/admin/sales'),
//            __DIR__ . '/../Resources/views/notifications' => resource_path('views/vendor/admin/notifications'),
//            __DIR__ . '/../Resources/views/layouts' => resource_path('views/vendor/admin/layouts'),
//            __DIR__ . '/../Resources/views/dashboard' => resource_path('views/vendor/admin/dashboard'),
        ],'admin');

        $this->loadViewsFrom(__DIR__ . '/../Resources/views', 'elektronika');
        $this->app->register(EventServiceProvider::class);
    }
    /**
     * Register services.
     *
     * @return void
     */
    public function register()
    {
        $this->registerConfig();
    }
        /**
     * Register package config.
     *
     * @return void
     */
    protected function registerConfig()
    {
        $this->mergeConfigFrom(
            dirname(__DIR__) . '/Config/carriers.php', 'carriers'
        );

        $this->mergeConfigFrom(
            dirname(__DIR__) . '/Config/system.php', 'core'
        );
    }
}