package com.fastest.pass.account.di

import com.fastest.pass.account.data.remote.AccountApiService
import com.fastest.pass.account.data.repository.AccountRepositoryImpl
import com.fastest.pass.account.domain.repository.AccountRepository
import com.fastest.pass.account.utils.AccountNavigation
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 AccountModule {

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

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

    @Provides
    @Singleton
    fun provideAccountRepository(accountApiService: AccountApiService) : AccountRepository {
        return AccountRepositoryImpl(accountApiService)
    }
}