<?php

namespace App\Providers;

use App\Models\Abortion;
use App\Models\ArtificialInsemination;
use App\Models\BodyWeight;
use App\Models\Calving;
use App\Models\Employee;
use App\Models\Deworming;
use App\Models\DryOff;
use App\Models\MilkProduction;
use App\Models\PregnancyDiagnosis;
use App\Models\Tag;
use App\Models\Treatment;
use App\Models\User;
use App\Models\Vaccination;
use App\Repositories\Contracts\AbortionRepository;
use App\Repositories\Contracts\ArtificialInseminationRepository;
use App\Repositories\Contracts\BodyWeightRepository;
use App\Repositories\Contracts\CalvingRepository;
use App\Repositories\Contracts\EmployeeRepository;
use App\Repositories\Contracts\DewormingRepository;
use App\Repositories\Contracts\DryOffRepository;
use App\Repositories\Contracts\MilkProductionRepository;
use App\Repositories\Contracts\PregnancyDiagnosisRepository;
use App\Repositories\Contracts\TagRepository;
use App\Repositories\Contracts\TreatmentRepository;
use App\Repositories\Contracts\UserRepository;
use App\Repositories\Contracts\VaccinationRepository;
use App\Repositories\EloquentAbortionRepository;
use App\Repositories\EloquentArtificialInseminationRepository;
use App\Repositories\EloquentBodyWeightRepository;
use App\Repositories\EloquentCalvingRepository;
use App\Repositories\EloquentEmployeeRepository;
use App\Repositories\EloquentDewormingRepository;
use App\Repositories\EloquentDryOffRepository;
use App\Repositories\EloquentMilkProductionRepository;
use App\Repositories\EloquentPregnancyDiagnosisRepository;
use App\Repositories\EloquentTagRepository;
use App\Repositories\EloquentTreatmentRepository;
use App\Repositories\EloquentUserRepository;
use App\Repositories\EloquentVaccinationRepository;
use Illuminate\Support\ServiceProvider;
use App\Models\PasswordReset;
use App\Repositories\Contracts\PasswordResetRepository;
use App\Repositories\EloquentPasswordResetRepository;

class RepositoryServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap services.
     *
     * @return void
     */
    public function boot()
    {
        //
    }

    /**
     * Register services.
     *
     * @return void
     */
    public function register()
    {
        $this->app->bind(UserRepository::class, function () {
            return new EloquentUserRepository(new User());
        });

        $this->app->bind(PasswordResetRepository::class, function () {
            return new EloquentPasswordResetRepository(new PasswordReset());
        });

        $this->app->bind(EmployeeRepository::class, function () {
            return new EloquentEmployeeRepository(new Employee());
        });

        $this->app->bind(MilkProductionRepository::class, function () {
            return new EloquentMilkProductionRepository(new MilkProduction());
        });

        $this->app->bind(ArtificialInseminationRepository::class, function () {
            return new EloquentArtificialInseminationRepository(new ArtificialInsemination());
        });

        $this->app->bind(PregnancyDiagnosisRepository::class, function () {
            return new EloquentPregnancyDiagnosisRepository(new PregnancyDiagnosis());
        });

        $this->app->bind(CalvingRepository::class, function () {
            return new EloquentCalvingRepository(new Calving());
        });

        $this->app->bind(AbortionRepository::class, function () {
            return new EloquentAbortionRepository(new Abortion());
        });

        $this->app->bind(DryOffRepository::class, function () {
            return new EloquentDryOffRepository(new DryOff());
        });

        $this->app->bind(BodyWeightRepository::class, function () {
            return new EloquentBodyWeightRepository(new BodyWeight());
        });

        $this->app->bind(DewormingRepository::class, function () {
            return new EloquentDewormingRepository(new Deworming());
        });

        $this->app->bind(TreatmentRepository::class, function () {
            return new EloquentTreatmentRepository(new Treatment());
        });

        $this->app->bind(VaccinationRepository::class, function () {
            return new EloquentVaccinationRepository(new Vaccination());
        });

        $this->app->bind(TagRepository::class, function () {
            return new EloquentTagRepository(new Tag());
        });
    }
}
