package com.fastest.pass.forgotpassword.di

import com.fastest.pass.forgotpassword.data.remote.ForgotPasswordApiService
import com.fastest.pass.forgotpassword.data.repository.ForgotPasswordRepositoryImpl
import com.fastest.pass.forgotpassword.domain.repository.ForgotPasswordRepository
import com.fastest.pass.forgotpassword.utils.ForgotPasswordNavigation
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import retrofit2.Retrofit
import javax.inject.Singleton

@Module
@InstallIn(SingletonComponent::class)
object ForgotPasswordModule {

    @Provides
    @Singleton
    fun provideNavigation(): ForgotPasswordNavigation {
        return ForgotPasswordNavigation()
    }

    @Provides
    @Singleton
    fun provideForgotPasswordApiService(retrofit: Retrofit) : ForgotPasswordApiService {
        return retrofit.create(ForgotPasswordApiService::class.java)
    }

    @Provides
    @Singleton
    fun provideForgotPasswordRepository(forgotPasswordApiService: ForgotPasswordApiService) : ForgotPasswordRepository {
        return ForgotPasswordRepositoryImpl(forgotPasswordApiService)
    }
}