package com.fastest.pass.signup.di

import com.fastest.pass.signup.data.remote.SignupApiService
import com.fastest.pass.signup.data.repository.SignupRepositoryImpl
import com.fastest.pass.signup.domain.repository.SignupRepository
import com.fastest.pass.signup.utils.SignUpNavigation
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 SignUpModule {

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

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

    @Provides
    @Singleton
    fun provideSignupRepository(signupApiService: SignupApiService) : SignupRepository {
        return SignupRepositoryImpl(signupApiService)
    }
}