package com.refactorizado.barfastic.presentation.di.modules

import android.app.Activity
import android.content.Context
import com.refactorizado.barfastic.data.food.LocalFoodRepository
import com.refactorizado.barfastic.domain.food.boundary.FoodRepository
import com.refactorizado.barfastic.domain.food.usecase.GetFoodListUseCase
import com.refactorizado.barfastic.presentation.di.scope.ActivityScope
import com.refactorizado.barfastic.presentation.food.presenter.FoodListPresenter
import dagger.Module
import dagger.Provides
import javax.inject.Singleton

@Module
class ActivityModule(private val activityContext: Activity) {

    @Provides @ActivityScope
    fun provideActivityContext(): Context {
        return activityContext
    }

    @Provides @ActivityScope
    fun provideFoodListPresenter(getFoodListUseCase: GetFoodListUseCase): FoodListPresenter
            = FoodListPresenter(getFoodListUseCase)

}