<?php
/*=========================================================================================
    App Name  : PPID PTUN Kupang
    File Name : RepositoryServiceProvider
    --------------------------------------------------------------------------------------
    Author    : Fuad Auliya Rohman
    Email     : fuad.dev16@gmail.com
==========================================================================================*/

namespace App\Providers;

use App\Services\BaseService;
use App\Repositories\BaseRepository;
use App\Contracts\CrudServiceContract;
use Modules\Menu\Services\MenuService;
use Modules\Role\Services\RoleService;
use Illuminate\Support\ServiceProvider;
use App\Contracts\CrudRepositoryContract;
use Modules\Artikel\Services\ArtikelService;
use Modules\Laporan\Services\LaporanService;
use Modules\Menu\Repositories\MenuRepository;
use Modules\Role\Repositories\RoleRepository;
use Modules\Pengguna\Services\PenggunaService;
use Modules\Menu\Services\MenuServiceInterface;
use Modules\Role\Services\RoleServiceInterface;
use Modules\Artikel\Repositories\ArtikelRepository;
use Modules\Laporan\Repositories\LaporanRepository;
use Modules\Artikel\Services\ArtikelServiceInterface;
use Modules\Laporan\Services\LaporanServiceInterface;
use Modules\Pengguna\Repositories\PenggunaRepository;
use Modules\Menu\Repositories\MenuRepositoryInterface;
use Modules\Role\Repositories\RoleRepositoryInterface;
use Modules\Pengguna\Services\PenggunaServiceInterface;
use Modules\Artikel\Repositories\ArtikelRepositoryInterface;
use Modules\Laporan\Repositories\LaporanRepositoryInterface;
use Modules\Pengguna\Repositories\PenggunaRepositoryInterface;

class RepositoryServiceProvider extends ServiceProvider
{
    /**
     * Register services.
     *
     * @return voids
     */
    public function register()
    {
        // SERVICES
        $this->app->bind(CrudServiceContract::class, BaseService::class);
        $this->app->bind(PenggunaServiceInterface::class, PenggunaService::class);
        $this->app->bind(RoleServiceInterface::class, RoleService::class);
        $this->app->bind(ArtikelServiceInterface::class, ArtikelService::class);
        $this->app->bind(LaporanServiceInterface::class, LaporanService::class);
        $this->app->bind(MenuServiceInterface::class, MenuService::class);

        // REPOSITORIES
        $this->app->bind(CrudRepositoryContract::class, BaseRepository::class);
        $this->app->bind(PenggunaRepositoryInterface::class, PenggunaRepository::class);
        $this->app->bind(RoleRepositoryInterface::class, RoleRepository::class);
        $this->app->bind(ArtikelRepositoryInterface::class, ArtikelRepository::class);
        $this->app->bind(LaporanRepositoryInterface::class, LaporanRepository::class);
        $this->app->bind(MenuRepositoryInterface::class, MenuRepository::class);
    }

    /**
     * Bootstrap services.
     *
     * @return void
     */
    public function boot()
    {
        //
    }

}
