package com.fastest.pass.home.di

import com.fastest.pass.home.data.remote.NewItemFormApiService
import com.fastest.pass.home.data.repository.NewItemFormRepositoryImpl
import com.fastest.pass.home.domain.repository.NewItemFormRepository
import com.fastest.pass.home.utils.NewItemFormNavigation
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 NewItemFormModule {

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

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

    @Provides
    @Singleton
    fun provideNewItemFormRepository(newItemFormApiService: NewItemFormApiService) : NewItemFormRepository {
        return NewItemFormRepositoryImpl(newItemFormApiService)
    }
}